From f006ed0076f7a3aa96b796a3a28e245b5e553027 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 16 Jul 2025 16:54:57 -0600 Subject: [PATCH 01/42] feat: Add camera control interfaces and messenger classes This commit introduces new interfaces in `CameraControl.cs` for various camera functionalities, including muting, panning, tilting, zooming, and auto modes. The `IHasCameras` interface is expanded to manage camera lists and selections, with the addition of `CameraSelectedEventArgs` for event handling. In `CameraBaseMessenger.cs`, a new `IHasCamerasMessenger` class is created to facilitate communication for devices implementing the `IHasCameras` interface, along with the `IHasCamerasStateMessage` class to represent the state of camera devices. These changes enhance the overall camera control capabilities and improve interaction management within the application. --- .../Cameras/CameraControl.cs | 166 +++++++++++++++++- .../Messengers/CameraBaseMessenger.cs | 8 +- .../Messengers/IHasCamerasMessenger.cs | 104 +++++++++++ 3 files changed, 274 insertions(+), 4 deletions(-) create mode 100644 src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs index cbf53476..3212c186 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs @@ -3,29 +3,60 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; - +using PepperDash.Core; using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Cameras { + /// + /// Enum for camera control modes + /// public enum eCameraControlMode - { + { + /// + /// Manual control mode, where the camera is controlled directly by the user or system + /// Manual = 0, + /// + /// Off control mode, where the camera is turned off or disabled + /// Off, + /// + /// Auto control mode, where the camera automatically adjusts settings based on the environment or conditions + /// Auto } - public interface IHasCameras + /// + /// Interface for devices that have cameras + /// + public interface IHasCameras : IKeyName { + /// + /// Event that is raised when a camera is selected + /// event EventHandler CameraSelected; + /// + /// List of cameras on the device. This should be a list of CameraBase objects + /// List Cameras { get; } + /// + /// The currently selected camera. This should be a CameraBase object + /// CameraBase SelectedCamera { get; } + /// + /// Feedback that indicates the currently selected camera + /// StringFeedback SelectedCameraFeedback { get; } + /// + /// + /// + /// void SelectCamera(string key); } @@ -42,7 +73,14 @@ namespace PepperDash.Essentials.Devices.Common.Cameras /// public interface IHasCameraOff { + /// + /// Feedback that indicates whether the camera is off + /// BoolFeedback CameraIsOffFeedback { get; } + + /// + /// Turns the camera off, blanking the near end video + /// void CameraOff(); } @@ -51,31 +89,71 @@ namespace PepperDash.Essentials.Devices.Common.Cameras /// public interface IHasCameraMute { + /// + /// Feedback that indicates whether the camera is muted + /// BoolFeedback CameraIsMutedFeedback { get; } + + /// + /// Mutes the camera video, preventing it from being sent to the far end + /// void CameraMuteOn(); + + /// + /// Unmutes the camera video, allowing it to be sent to the far end + /// void CameraMuteOff(); + + /// + /// Toggles the camera mute state. If the camera is muted, it will be unmuted, and vice versa. + /// void CameraMuteToggle(); } + /// + /// Interface for devices that can mute and unmute their camera video, with an event for unmute requests + /// public interface IHasCameraMuteWithUnmuteReqeust : IHasCameraMute { + /// + /// Event that is raised when a video unmute is requested, typically by the far end + /// event EventHandler VideoUnmuteRequested; } + /// + /// Event arguments for the CameraSelected event + /// public class CameraSelectedEventArgs : EventArgs { + /// + /// The selected camera + /// public CameraBase SelectedCamera { get; private set; } + /// + /// Constructor for CameraSelectedEventArgs + /// + /// public CameraSelectedEventArgs(CameraBase camera) { SelectedCamera = camera; } } + /// + /// Interface for devices that have a far end camera control + /// public interface IHasFarEndCameraControl { + /// + /// Gets the far end camera, which is typically a CameraBase object that represents the camera at the far end of a call + /// CameraBase FarEndCamera { get; } + /// + /// Feedback that indicates whether the far end camera is being controlled + /// BoolFeedback ControllingFarEndCameraFeedback { get; } } @@ -88,6 +166,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } + /// + /// Interface for devices that have camera controls + /// public interface IHasCameraControls { } @@ -108,8 +189,19 @@ namespace PepperDash.Essentials.Devices.Common.Cameras /// public interface IHasCameraPanControl : IHasCameraControls { + /// + /// Pans the camera left + /// void PanLeft(); + + /// + /// Pans the camera right + /// void PanRight(); + + /// + /// Stops the camera pan movement + /// void PanStop(); } @@ -118,8 +210,19 @@ namespace PepperDash.Essentials.Devices.Common.Cameras /// public interface IHasCameraTiltControl : IHasCameraControls { + /// + /// Tilts the camera down + /// void TiltDown(); + + /// + /// Tilts the camera up + /// void TiltUp(); + + /// + /// Stops the camera tilt movement + /// void TiltStop(); } @@ -128,8 +231,19 @@ namespace PepperDash.Essentials.Devices.Common.Cameras /// public interface IHasCameraZoomControl : IHasCameraControls { + /// + /// Zooms the camera in + /// void ZoomIn(); + + /// + /// Zooms the camera out + /// void ZoomOut(); + + /// + /// Stops the camera zoom movement + /// void ZoomStop(); } @@ -138,25 +252,71 @@ namespace PepperDash.Essentials.Devices.Common.Cameras /// public interface IHasCameraFocusControl : IHasCameraControls { + /// + /// Focuses the camera near + /// void FocusNear(); + + /// + /// Focuses the camera far + /// void FocusFar(); + + /// + /// Stops the camera focus movement + /// void FocusStop(); + /// + /// Triggers the camera's auto focus functionality, if available. + /// void TriggerAutoFocus(); } + /// + /// Interface for devices that have auto focus mode control + /// public interface IHasAutoFocusMode { + /// + /// Sets the focus mode to auto or manual, or toggles between them. + /// void SetFocusModeAuto(); + + /// + /// Sets the focus mode to manual, allowing for manual focus adjustments. + /// void SetFocusModeManual(); + + /// + /// Toggles the focus mode between auto and manual. + /// void ToggleFocusMode(); } + /// + /// Interface for devices that have camera auto mode control + /// public interface IHasCameraAutoMode : IHasCameraControls { + /// + /// Enables or disables the camera's auto mode, which may include automatic adjustments for focus, exposure, and other settings. + /// void CameraAutoModeOn(); + + /// + /// Disables the camera's auto mode, allowing for manual control of camera settings. + /// void CameraAutoModeOff(); + + /// + /// Toggles the camera's auto mode state. If the camera is in auto mode, it will switch to manual mode, and vice versa. + /// void CameraAutoModeToggle(); + + /// + /// Feedback that indicates whether the camera's auto mode is currently enabled. + /// BoolFeedback CameraAutoModeIsOnFeedback { get; } } diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs index 36a94781..dd67a6fe 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs @@ -6,11 +6,14 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Messenger for a CameraBase device + /// public class CameraBaseMessenger : MessengerBase { /// /// Device being bridged - /// + /// public CameraBase Camera { get; set; } /// @@ -45,6 +48,9 @@ namespace PepperDash.Essentials.AppServer.Messengers ); } + /// + /// Registers the actions for this messenger. This is called by the base class + /// protected override void RegisterActions() { base.RegisterActions(); diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs new file mode 100644 index 00000000..6245f037 --- /dev/null +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs @@ -0,0 +1,104 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using PepperDash.Essentials.Devices.Common.Cameras; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PepperDash.Essentials.AppServer.Messengers +{ + /// + /// Messenger for devices that implement the IHasCameras interface. + /// + public class IHasCamerasMessenger : MessengerBase + { + /// + /// Device being bridged that implements IHasCameras interface. + /// + public IHasCameras CameraController { get; private set; } + + /// + /// Messenger for devices that implement IHasCameras interface. + /// + /// + /// + /// + /// + public IHasCamerasMessenger(string key, IHasCameras cameraController, string messagePath) + : base(key, messagePath, cameraController) + { + CameraController = cameraController ?? throw new ArgumentNullException("cameraController"); + CameraController.CameraSelected += CameraController_CameraSelected; + } + + private void CameraController_CameraSelected(object sender, CameraSelectedEventArgs e) + { + PostStatusMessage(new IHasCamerasStateMessage + { + SelectedCamera = e.SelectedCamera + }); + } + + /// + /// Registers the actions for this messenger. + /// + /// + protected override void RegisterActions() + { + base.RegisterActions(); + + AddAction("/fullStatus", (id, context) => + { + SendFullStatus(); + }); + + AddAction("/selectCamera", (id, content) => + { + var cameraKey = content?.ToObject(); + + if (!string.IsNullOrEmpty(cameraKey)) + { + CameraController.SelectCamera(cameraKey); + } + else + { + throw new ArgumentException("Content must be a string representing the camera key"); + } + }); + } + + private void SendFullStatus() + { + var state = new IHasCamerasStateMessage + { + CameraList = CameraController.Cameras, + SelectedCamera = CameraController.SelectedCamera + }; + + PostStatusMessage(state); + } + + + } + + /// + /// State message for devices that implement the IHasCameras interface. + /// + public class IHasCamerasStateMessage : DeviceStateMessageBase + { + /// + /// List of cameras available in the device. + /// + [JsonProperty("cameraList", NullValueHandling = NullValueHandling.Ignore)] + public List CameraList { get; set; } + + /// + /// The currently selected camera on the device. + /// + [JsonProperty("selectedCamera", NullValueHandling = NullValueHandling.Ignore)] + public CameraBase SelectedCamera { get; set; } + + } +} From f8455d4110cc616373e6f43c3b57bf90faee71aa Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 17 Jul 2025 11:14:32 -0600 Subject: [PATCH 02/42] feat: Refactor IHasCamerasMessenger constructor parameters Updated the constructor of `IHasCamerasMessenger` to reorder parameters, placing `IHasCameras cameraController` last. Added logic in `MobileControlSystemController.cs` to instantiate and add `IHasCamerasMessenger` for devices implementing the `IHasCameras` interface. --- .../Messengers/IHasCamerasMessenger.cs | 2 +- .../MobileControlSystemController.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs index 6245f037..ffd1a605 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs @@ -26,7 +26,7 @@ namespace PepperDash.Essentials.AppServer.Messengers /// /// /// - public IHasCamerasMessenger(string key, IHasCameras cameraController, string messagePath) + public IHasCamerasMessenger(string key, string messagePath , IHasCameras cameraController) : base(key, messagePath, cameraController) { CameraController = cameraController ?? throw new ArgumentNullException("cameraController"); diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs index b17e0490..9d2eaf96 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs @@ -907,6 +907,19 @@ namespace PepperDash.Essentials messengerAdded = true; } + if (device is IHasCameras cameras) + { + this.LogVerbose("Adding IHasCamerasMessenger for {deviceKey}", device.Key + ); + var messenger = new IHasCamerasMessenger( + $"{device.Key}-cameras-{Key}", + $"/device/{device.Key}", + cameras + ); + AddDefaultDeviceMessenger(messenger); + messengerAdded = true; + } + this.LogVerbose("Trying to cast to generic device for device: {key}", device.Key); if (device is EssentialsDevice) From d282487da67f6df2f5f41a4cd14e00f1d7ad7c10 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:35:41 +0000 Subject: [PATCH 03/42] Initial plan From eeb0e84dc763833c5a2379c7b0f697051a69ede4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:44:52 +0000 Subject: [PATCH 04/42] docs: enable XML documentation generation and add initial documentation Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com> --- .../PepperDash.Essentials.Core.csproj | 1 + ...epperDash.Essentials.Devices.Common.csproj | 1 + ...Essentials.MobileControl.Messengers.csproj | 1 + ...PepperDash.Essentials.MobileControl.csproj | 1 + src/PepperDash.Essentials/ControlSystem.cs | 6 ++++ .../Factory/DeviceFactory.cs | 3 ++ src/PepperDash.Essentials/HttpLogoServer.cs | 28 +++++++++++-------- .../PepperDash.Essentials.csproj | 5 ++-- 8 files changed, 33 insertions(+), 13 deletions(-) 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.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.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/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/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs index 936255a3..5266a840 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() { 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..1f400f92 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,10 @@ namespace PepperDash.Essentials } /// - /// + /// Gets the content type for a file based on its extension /// - /// - /// + /// The file extension + /// The corresponding content type string 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 From 260677a37f5d1f2f7cb1e50904fd7a33d1f4658f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:48:23 +0000 Subject: [PATCH 05/42] docs: add XML documentation to PepperDash.Core project Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com> --- .../Comm/CommunicationGather.cs | 3 + .../Comm/CommunicationStreamDebugging.cs | 15 ++ .../Comm/ControlPropertiesConfig.cs | 3 + src/PepperDash.Core/Comm/EventArgs.cs | 9 ++ .../Comm/GenericSecureTcpIpClient.cs | 36 +++++ .../GenericSecureTcpIpClient_ForServer.cs | 24 +++ .../Comm/GenericSecureTcpIpServer.cs | 48 ++++++ src/PepperDash.Core/Comm/GenericSshClient.cs | 36 +++++ .../Comm/GenericTcpIpClient.cs | 42 ++++++ .../Comm/GenericTcpIpClient_ForServer.cs | 24 +++ .../Comm/GenericTcpIpServer.cs | 48 ++++++ src/PepperDash.Core/Comm/GenericUdpServer.cs | 18 +++ .../Comm/TcpClientConfigObject.cs | 3 + src/PepperDash.Core/CommunicationExtras.cs | 12 ++ .../Config/PortalConfigReader.cs | 3 + src/PepperDash.Core/Conversion/Convert.cs | 9 ++ src/PepperDash.Core/Device.cs | 34 ++++- src/PepperDash.Core/EthernetHelper.cs | 6 + src/PepperDash.Core/EventArgs.cs | 27 ++++ .../EventArgs and Constants.cs | 6 + .../JsonStandardObjects/JsonToSimplDevice.cs | 3 + .../JsonToSimplDeviceConfig.cs | 30 ++++ src/PepperDash.Core/JsonToSimpl/Constants.cs | 6 + src/PepperDash.Core/JsonToSimpl/Global.cs | 6 + .../JsonToSimplArrayLookupChild.cs | 6 + .../JsonToSimpl/JsonToSimplChildObjectBase.cs | 36 +++++ .../JsonToSimpl/JsonToSimplFileMaster.cs | 9 ++ .../JsonToSimpl/JsonToSimplFixedPathObject.cs | 3 + .../JsonToSimpl/JsonToSimplGenericMaster.cs | 12 ++ .../JsonToSimpl/JsonToSimplMaster.cs | 18 +++ .../JsonToSimplPortalFileMaster.cs | 6 + .../Logging/CrestronEnricher.cs | 6 + src/PepperDash.Core/Logging/Debug.cs | 138 ++++++++++++++++++ .../Logging/DebugConsoleSink.cs | 9 ++ src/PepperDash.Core/Logging/DebugContext.cs | 15 ++ .../Logging/DebugCrestronLoggerSink.cs | 6 + .../Logging/DebugErrorLogSink.cs | 6 + .../Logging/DebugExtensions.cs | 39 +++++ src/PepperDash.Core/Logging/DebugMemory.cs | 15 ++ .../Logging/DebugWebsocketSink.cs | 21 +++ .../PasswordManagement/PasswordClient.cs | 15 ++ .../PasswordManagement/PasswordManager.cs | 9 ++ .../SystemInfo/EventArgs and Constants.cs | 12 ++ .../SystemInfo/SystemInfoToSimpl.cs | 18 +++ src/PepperDash.Core/Web/BouncyCertificate.cs | 15 ++ .../RequestHandlers/DefaultRequestHandler.cs | 3 + .../WebApiBaseRequestAsyncHandler.cs | 3 + .../WebApiBaseRequestHandler.cs | 3 + src/PepperDash.Core/Web/WebApiServer.cs | 24 +++ src/PepperDash.Core/WebApi/Presets/Preset.cs | 27 ++++ src/PepperDash.Core/WebApi/Presets/User.cs | 24 +++ .../WebApi/Presets/WebApiPasscodeClient.cs | 12 ++ .../XSigUtility/Tokens/XSigAnalogToken.cs | 9 ++ .../XSigUtility/Tokens/XSigDigitalToken.cs | 9 ++ .../XSigUtility/Tokens/XSigSerialToken.cs | 6 + .../XSigUtility/XSigHelpers.cs | 42 ++++++ .../XSigUtility/XSigTokenStreamReader.cs | 9 ++ .../XSigUtility/XSigTokenStreamWriter.cs | 18 +++ .../Factory/DeviceFactory.cs | 23 +++ 59 files changed, 1072 insertions(+), 5 deletions(-) diff --git a/src/PepperDash.Core/Comm/CommunicationGather.cs b/src/PepperDash.Core/Comm/CommunicationGather.cs index 9ffe8262..3a03f929 100644 --- a/src/PepperDash.Core/Comm/CommunicationGather.cs +++ b/src/PepperDash.Core/Comm/CommunicationGather.cs @@ -88,6 +88,9 @@ namespace PepperDash.Core /// Disconnects this gather from the Port's TextReceived event. This will not fire LineReceived /// after the this call. /// + /// + /// Stop method + /// public void Stop() { Port.TextReceived -= Port_TextReceived; diff --git a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs index 0a38d826..59d00d29 100644 --- a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs +++ b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs @@ -25,6 +25,9 @@ namespace PepperDash.Core /// /// The current debug setting /// + /// + /// Gets or sets the DebugSetting + /// public eStreamDebuggingSetting DebugSetting { get; private set; } private uint _DebugTimeoutInMs; @@ -44,6 +47,9 @@ namespace PepperDash.Core /// /// Indicates that receive stream debugging is enabled /// + /// + /// Gets or sets the RxStreamDebuggingIsEnabled + /// public bool RxStreamDebuggingIsEnabled{ get; private set; } /// @@ -65,6 +71,9 @@ namespace PepperDash.Core /// Sets the debugging setting and if not setting to off, assumes the default of 30 mintues /// /// + /// + /// SetDebuggingWithDefaultTimeout method + /// public void SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting setting) { if (setting == eStreamDebuggingSetting.Off) @@ -81,6 +90,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SetDebuggingWithSpecificTimeout method + /// public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes) { if (setting == eStreamDebuggingSetting.Off) @@ -135,6 +147,9 @@ namespace PepperDash.Core /// The available settings for stream debugging /// [Flags] + /// + /// Enumeration of eStreamDebuggingSetting values + /// public enum eStreamDebuggingSetting { /// diff --git a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs index ff869f77..443e3c40 100644 --- a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs +++ b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs @@ -8,6 +8,9 @@ namespace PepperDash.Core /// /// Config properties that indicate how to communicate with a device for control /// + /// + /// Represents a ControlPropertiesConfig + /// public class ControlPropertiesConfig { /// diff --git a/src/PepperDash.Core/Comm/EventArgs.cs b/src/PepperDash.Core/Comm/EventArgs.cs index cf76d6b3..09904f21 100644 --- a/src/PepperDash.Core/Comm/EventArgs.cs +++ b/src/PepperDash.Core/Comm/EventArgs.cs @@ -32,6 +32,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Gets or sets the Client + /// public ISocketStatus Client { get; private set; } /// @@ -62,6 +65,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Gets or sets the State + /// public ServerState State { get; private set; } /// @@ -156,6 +162,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Gets or sets the Text + /// public string Text { get; private set; } /// diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs index 5ad2e29d..78c3cb0d 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs @@ -81,6 +81,9 @@ namespace PepperDash.Core /// /// Port on server /// + /// + /// Gets or sets the Port + /// public int Port { get; set; } /// @@ -151,6 +154,9 @@ namespace PepperDash.Core /// /// bool to track if auto reconnect should be set on the socket /// + /// + /// Gets or sets the AutoReconnect + /// public bool AutoReconnect { get; set; } /// @@ -190,6 +196,9 @@ namespace PepperDash.Core /// /// Bool to show whether the server requires a preshared key. This is used in the DynamicTCPServer class /// + /// + /// Gets or sets the SharedKeyRequired + /// public bool SharedKeyRequired { get; set; } /// @@ -209,6 +218,9 @@ namespace PepperDash.Core /// /// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module /// + /// + /// Gets or sets the SharedKey + /// public string SharedKey { get; set; } /// @@ -224,6 +236,9 @@ namespace PepperDash.Core /// /// Bool showing if socket is ready for communication after shared key exchange /// + /// + /// Gets or sets the IsReadyForCommunication + /// public bool IsReadyForCommunication { get; set; } /// @@ -344,6 +359,9 @@ namespace PepperDash.Core /// /// Just to help S+ set the key /// + /// + /// Initialize method + /// public void Initialize(string key) { Key = key; @@ -421,6 +439,9 @@ namespace PepperDash.Core /// Deactivate the client /// /// + /// + /// Deactivate method + /// public override bool Deactivate() { if (_client != null) @@ -434,6 +455,9 @@ namespace PepperDash.Core /// /// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name. /// + /// + /// Connect method + /// public void Connect() { ConnectionCount++; @@ -565,6 +589,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Disconnect method + /// public void Disconnect() { this.LogVerbose("Disconnect Called"); @@ -588,6 +615,9 @@ namespace PepperDash.Core /// /// Does the actual disconnect business /// + /// + /// DisconnectClient method + /// public void DisconnectClient() { if (_client == null) return; @@ -848,6 +878,9 @@ namespace PepperDash.Core /// /// General send method /// + /// + /// SendText method + /// public void SendText(string text) { if (!string.IsNullOrEmpty(text)) @@ -877,6 +910,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (bytes.Length > 0) diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs index 93b195ca..d2deaecc 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs @@ -82,6 +82,9 @@ namespace PepperDash.Core /// /// Port on server /// + /// + /// Gets or sets the Port + /// public int Port { get; set; } /// @@ -115,6 +118,9 @@ namespace PepperDash.Core /// /// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module /// + /// + /// Gets or sets the SharedKey + /// public string SharedKey { get; set; } /// @@ -125,6 +131,9 @@ namespace PepperDash.Core /// /// Defaults to 2000 /// + /// + /// Gets or sets the BufferSize + /// public int BufferSize { get; set; } /// @@ -338,6 +347,9 @@ namespace PepperDash.Core /// /// Just to help S+ set the key /// + /// + /// Initialize method + /// public void Initialize(string key) { Key = key; @@ -397,6 +409,9 @@ namespace PepperDash.Core /// /// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name. /// + /// + /// Connect method + /// public void Connect() { ConnectionCount++; @@ -528,6 +543,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Disconnect method + /// public void Disconnect() { this.LogVerbose("Disconnect Called"); @@ -806,6 +824,9 @@ namespace PepperDash.Core /// /// General send method /// + /// + /// SendText method + /// public void SendText(string text) { if (!string.IsNullOrEmpty(text)) @@ -835,6 +856,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (bytes.Length > 0) diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs index e0da068f..db3ea304 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs @@ -60,6 +60,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Delegate for ServerHasChokedCallbackDelegate + /// public delegate void ServerHasChokedCallbackDelegate(); #endregion @@ -106,6 +109,9 @@ namespace PepperDash.Core /// /// 3 by default /// + /// + /// Gets or sets the MonitorClientMaxFailureCount + /// public int MonitorClientMaxFailureCount { get; set; } /// @@ -192,6 +198,9 @@ namespace PepperDash.Core /// /// Port Server should listen on /// + /// + /// Gets or sets the Port + /// public int Port { get; set; } /// @@ -226,6 +235,9 @@ namespace PepperDash.Core /// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module. /// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called /// + /// + /// Gets or sets the SharedKey + /// public string SharedKey { get; set; } /// @@ -250,6 +262,9 @@ namespace PepperDash.Core /// /// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+ /// + /// + /// Gets or sets the HeartbeatRequiredIntervalMs + /// public int HeartbeatRequiredIntervalMs { get; set; } /// @@ -260,6 +275,9 @@ namespace PepperDash.Core /// /// String to Match for heartbeat. If null or empty any string will reset heartbeat timer /// + /// + /// Gets or sets the HeartbeatStringToMatch + /// public string HeartbeatStringToMatch { get; set; } //private timers for Heartbeats per client @@ -278,6 +296,9 @@ namespace PepperDash.Core /// /// Defaults to 2000 /// + /// + /// Gets or sets the BufferSize + /// public int BufferSize { get; set; } /// @@ -341,6 +362,9 @@ namespace PepperDash.Core /// /// Disconnects all clients and stops the server /// + /// + /// KillServer method + /// public void KillServer() { ServerStopped = true; @@ -356,6 +380,9 @@ namespace PepperDash.Core /// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+ /// /// + /// + /// Initialize method + /// public void Initialize(string key) { Key = key; @@ -397,6 +424,9 @@ namespace PepperDash.Core /// /// Start listening on the specified port /// + /// + /// Listen method + /// public void Listen() { ServerCCSection.Enter(); @@ -455,6 +485,9 @@ namespace PepperDash.Core /// /// Stop Listeneing /// + /// + /// StopListening method + /// public void StopListening() { try @@ -478,6 +511,9 @@ namespace PepperDash.Core /// Disconnects Client /// /// + /// + /// DisconnectClient method + /// public void DisconnectClient(uint client) { try @@ -493,6 +529,9 @@ namespace PepperDash.Core /// /// Disconnect All Clients /// + /// + /// DisconnectAllClientsForShutdown method + /// public void DisconnectAllClientsForShutdown() { Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Disconnecting All Clients"); @@ -533,6 +572,9 @@ namespace PepperDash.Core /// Broadcast text from server to all connected clients /// /// + /// + /// BroadcastText method + /// public void BroadcastText(string text) { CCriticalSection CCBroadcast = new CCriticalSection(); @@ -566,6 +608,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendTextToClient method + /// public void SendTextToClient(string text, uint clientIndex) { try @@ -634,6 +679,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetClientIPAddress method + /// public string GetClientIPAddress(uint clientIndex) { Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex); diff --git a/src/PepperDash.Core/Comm/GenericSshClient.cs b/src/PepperDash.Core/Comm/GenericSshClient.cs index fa5b95bb..52b88bea 100644 --- a/src/PepperDash.Core/Comm/GenericSshClient.cs +++ b/src/PepperDash.Core/Comm/GenericSshClient.cs @@ -44,6 +44,9 @@ namespace PepperDash.Core /// /// Address of server /// + /// + /// Gets or sets the Hostname + /// public string Hostname { get; set; } /// @@ -54,11 +57,17 @@ namespace PepperDash.Core /// /// Username for server /// + /// + /// Gets or sets the Username + /// public string Username { get; set; } /// /// And... Password for server. That was worth documenting! /// + /// + /// Gets or sets the Password + /// public string Password { get; set; } /// @@ -126,6 +135,9 @@ namespace PepperDash.Core /// Millisecond value, determines the timeout period in between reconnect attempts. /// Set to 5000 by default /// + /// + /// Gets or sets the AutoReconnectIntervalMs + /// public int AutoReconnectIntervalMs { get; set; } SshClient Client; @@ -200,6 +212,9 @@ namespace PepperDash.Core /// /// Connect to the server, using the provided properties. /// + /// + /// Connect method + /// public void Connect() { // Don't go unless everything is here @@ -327,6 +342,9 @@ namespace PepperDash.Core /// /// Disconnect the clients and put away it's resources. /// + /// + /// Disconnect method + /// public void Disconnect() { ConnectEnabled = false; @@ -476,6 +494,9 @@ namespace PepperDash.Core /// Sends text to the server /// /// + /// + /// SendText method + /// public void SendText(string text) { try @@ -513,6 +534,9 @@ namespace PepperDash.Core /// Sends Bytes to the server /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { try @@ -551,6 +575,9 @@ namespace PepperDash.Core /// /// Fired when connection changes /// +/// +/// Represents a SshConnectionChangeEventArgs +/// public class SshConnectionChangeEventArgs : EventArgs { /// @@ -561,16 +588,25 @@ public class SshConnectionChangeEventArgs : EventArgs /// /// Connection Status represented as a ushort /// + /// + /// Gets or sets the UIsConnected + /// public ushort UIsConnected { get { return (ushort)(Client.IsConnected ? 1 : 0); } } /// /// The client /// + /// + /// Gets or sets the Client + /// public GenericSshClient Client { get; private set; } /// /// Socket Status as represented by /// + /// + /// Gets or sets the Status + /// public ushort Status { get { return Client.UStatus; } } /// diff --git a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs index 9529aa29..ef4737be 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs @@ -61,6 +61,9 @@ namespace PepperDash.Core /// /// Port on server /// + /// + /// Gets or sets the Port + /// public int Port { get; set; } /// @@ -138,6 +141,9 @@ namespace PepperDash.Core /// /// bool to track if auto reconnect should be set on the socket /// + /// + /// Gets or sets the AutoReconnect + /// public bool AutoReconnect { get; set; } /// @@ -234,6 +240,9 @@ namespace PepperDash.Core /// /// Just to help S+ set the key /// + /// + /// Initialize method + /// public void Initialize(string key) { Key = key; @@ -255,6 +264,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Deactivate method + /// public override bool Deactivate() { RetryTimer.Stop(); @@ -270,6 +282,9 @@ namespace PepperDash.Core /// /// Attempts to connect to the server /// + /// + /// Connect method + /// public void Connect() { if (string.IsNullOrEmpty(Hostname)) @@ -337,6 +352,9 @@ namespace PepperDash.Core /// /// Attempts to disconnect the client /// + /// + /// Disconnect method + /// public void Disconnect() { try @@ -357,6 +375,9 @@ namespace PepperDash.Core /// /// Does the actual disconnect business /// + /// + /// DisconnectClient method + /// public void DisconnectClient() { if (_client != null) @@ -449,6 +470,9 @@ namespace PepperDash.Core /// /// General send method /// + /// + /// SendText method + /// public void SendText(string text) { var bytes = Encoding.GetEncoding(28591).GetBytes(text); @@ -462,6 +486,9 @@ namespace PepperDash.Core /// /// This is useful from console and...? /// + /// + /// SendEscapedText method + /// public void SendEscapedText(string text) { var unescapedText = Regex.Replace(text, @"\\x([0-9a-fA-F][0-9a-fA-F])", s => @@ -476,6 +503,9 @@ namespace PepperDash.Core /// Sends Bytes to the server /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (StreamDebugging.TxStreamDebuggingIsEnabled) @@ -511,6 +541,9 @@ namespace PepperDash.Core /// /// Configuration properties for TCP/SSH Connections /// + /// + /// Represents a TcpSshPropertiesConfig + /// public class TcpSshPropertiesConfig { /// @@ -532,6 +565,9 @@ namespace PepperDash.Core /// /// Passord credential /// + /// + /// Gets or sets the Password + /// public string Password { get; set; } /// @@ -542,11 +578,17 @@ namespace PepperDash.Core /// /// Defaults to true /// + /// + /// Gets or sets the AutoReconnect + /// public bool AutoReconnect { get; set; } /// /// Defaults to 5000ms /// + /// + /// Gets or sets the AutoReconnectIntervalMs + /// public int AutoReconnectIntervalMs { get; set; } /// diff --git a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs index 03a27827..437d99eb 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs @@ -71,6 +71,9 @@ namespace PepperDash.Core /// /// Port on server /// + /// + /// Gets or sets the Port + /// public int Port { get; set; } /// @@ -104,6 +107,9 @@ namespace PepperDash.Core /// /// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module /// + /// + /// Gets or sets the SharedKey + /// public string SharedKey { get; set; } /// @@ -114,6 +120,9 @@ namespace PepperDash.Core /// /// Defaults to 2000 /// + /// + /// Gets or sets the BufferSize + /// public int BufferSize { get; set; } /// @@ -291,6 +300,9 @@ namespace PepperDash.Core /// /// Just to help S+ set the key /// + /// + /// Initialize method + /// public void Initialize(string key) { Key = key; @@ -313,6 +325,9 @@ namespace PepperDash.Core /// /// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name. /// + /// + /// Connect method + /// public void Connect() { ConnectionCount++; @@ -444,6 +459,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Disconnect method + /// public void Disconnect() { this.LogVerbose("Disconnect Called"); @@ -671,6 +689,9 @@ namespace PepperDash.Core /// /// General send method /// + /// + /// SendText method + /// public void SendText(string text) { if (!string.IsNullOrEmpty(text)) @@ -700,6 +721,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (bytes.Length > 0) diff --git a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs index 6aa5e6b5..e05064b7 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs @@ -54,6 +54,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Delegate for ServerHasChokedCallbackDelegate + /// public delegate void ServerHasChokedCallbackDelegate(); #endregion @@ -84,6 +87,9 @@ namespace PepperDash.Core /// /// 3 by default /// + /// + /// Gets or sets the MonitorClientMaxFailureCount + /// public int MonitorClientMaxFailureCount { get; set; } /// @@ -173,6 +179,9 @@ namespace PepperDash.Core /// /// Port Server should listen on /// + /// + /// Gets or sets the Port + /// public int Port { get; set; } /// @@ -207,6 +216,9 @@ namespace PepperDash.Core /// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module. /// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called /// + /// + /// Gets or sets the SharedKey + /// public string SharedKey { get; set; } /// @@ -231,6 +243,9 @@ namespace PepperDash.Core /// /// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+ /// + /// + /// Gets or sets the HeartbeatRequiredIntervalMs + /// public int HeartbeatRequiredIntervalMs { get; set; } /// @@ -241,6 +256,9 @@ namespace PepperDash.Core /// /// String to Match for heartbeat. If null or empty any string will reset heartbeat timer /// + /// + /// Gets or sets the HeartbeatStringToMatch + /// public string HeartbeatStringToMatch { get; set; } //private timers for Heartbeats per client @@ -259,6 +277,9 @@ namespace PepperDash.Core /// /// Defaults to 2000 /// + /// + /// Gets or sets the BufferSize + /// public int BufferSize { get; set; } /// @@ -322,6 +343,9 @@ namespace PepperDash.Core /// /// Disconnects all clients and stops the server /// + /// + /// KillServer method + /// public void KillServer() { ServerStopped = true; @@ -337,6 +361,9 @@ namespace PepperDash.Core /// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+ /// /// + /// + /// Initialize method + /// public void Initialize(string key) { Key = key; @@ -377,6 +404,9 @@ namespace PepperDash.Core /// /// Start listening on the specified port /// + /// + /// Listen method + /// public void Listen() { ServerCCSection.Enter(); @@ -434,6 +464,9 @@ namespace PepperDash.Core /// /// Stop Listening /// + /// + /// StopListening method + /// public void StopListening() { try @@ -457,6 +490,9 @@ namespace PepperDash.Core /// Disconnects Client /// /// + /// + /// DisconnectClient method + /// public void DisconnectClient(uint client) { try @@ -472,6 +508,9 @@ namespace PepperDash.Core /// /// Disconnect All Clients /// + /// + /// DisconnectAllClientsForShutdown method + /// public void DisconnectAllClientsForShutdown() { Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Disconnecting All Clients"); @@ -512,6 +551,9 @@ namespace PepperDash.Core /// Broadcast text from server to all connected clients /// /// + /// + /// BroadcastText method + /// public void BroadcastText(string text) { CCriticalSection CCBroadcast = new CCriticalSection(); @@ -545,6 +587,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendTextToClient method + /// public void SendTextToClient(string text, uint clientIndex) { try @@ -613,6 +658,9 @@ namespace PepperDash.Core /// /// /// IP address of the client + /// + /// GetClientIPAddress method + /// public string GetClientIPAddress(uint clientIndex) { Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex); diff --git a/src/PepperDash.Core/Comm/GenericUdpServer.cs b/src/PepperDash.Core/Comm/GenericUdpServer.cs index a5a68c45..15f80443 100644 --- a/src/PepperDash.Core/Comm/GenericUdpServer.cs +++ b/src/PepperDash.Core/Comm/GenericUdpServer.cs @@ -150,6 +150,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Initialize method + /// public void Initialize(string key, string address, ushort port) { Key = key; @@ -187,6 +190,9 @@ namespace PepperDash.Core /// /// Enables the UDP Server /// + /// + /// Connect method + /// public void Connect() { if (Server == null) @@ -224,6 +230,9 @@ namespace PepperDash.Core /// /// Disabled the UDP Server /// + /// + /// Disconnect method + /// public void Disconnect() { if(Server != null) @@ -292,6 +301,9 @@ namespace PepperDash.Core /// General send method /// /// + /// + /// SendText method + /// public void SendText(string text) { var bytes = Encoding.GetEncoding(28591).GetBytes(text); @@ -309,6 +321,9 @@ namespace PepperDash.Core /// /// /// + /// + /// SendBytes method + /// public void SendBytes(byte[] bytes) { if (StreamDebugging.TxStreamDebuggingIsEnabled) @@ -323,6 +338,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Represents a GenericUdpReceiveTextExtraArgs + /// public class GenericUdpReceiveTextExtraArgs : EventArgs { /// diff --git a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs index c3b3bcec..86c891d1 100644 --- a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs +++ b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs @@ -5,6 +5,9 @@ namespace PepperDash.Core /// /// Client config object for TCP client with server that inherits from TcpSshPropertiesConfig and adds properties for shared key and heartbeat /// + /// + /// Represents a TcpClientConfigObject + /// public class TcpClientConfigObject { /// diff --git a/src/PepperDash.Core/CommunicationExtras.cs b/src/PepperDash.Core/CommunicationExtras.cs index 81fd76c5..a3ccb811 100644 --- a/src/PepperDash.Core/CommunicationExtras.cs +++ b/src/PepperDash.Core/CommunicationExtras.cs @@ -41,6 +41,9 @@ namespace PepperDash.Core /// /// Represents a device that uses basic connection /// + /// + /// Defines the contract for IBasicCommunication + /// public interface IBasicCommunication : ICommunicationReceiver { /// @@ -150,6 +153,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Gets or sets the Bytes + /// public byte[] Bytes { get; private set; } /// @@ -228,6 +234,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetEscapedText method + /// public static string GetEscapedText(string text) { var bytes = Encoding.GetEncoding(28591).GetBytes(text); @@ -239,6 +248,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetDebugText method + /// public static string GetDebugText(string text) { return Regex.Replace(text, @"[^\u0020-\u007E]", a => GetEscapedText(a.Value)); diff --git a/src/PepperDash.Core/Config/PortalConfigReader.cs b/src/PepperDash.Core/Config/PortalConfigReader.cs index 43e9ea1e..ffb2d16b 100644 --- a/src/PepperDash.Core/Config/PortalConfigReader.cs +++ b/src/PepperDash.Core/Config/PortalConfigReader.cs @@ -67,6 +67,9 @@ namespace PepperDash.Core.Config /// /// /// + /// + /// MergeConfigs method + /// public static JObject MergeConfigs(JObject doubleConfig) { var system = JObject.FromObject(doubleConfig["system"]); diff --git a/src/PepperDash.Core/Conversion/Convert.cs b/src/PepperDash.Core/Conversion/Convert.cs index 2bafdcb0..49f8bb94 100644 --- a/src/PepperDash.Core/Conversion/Convert.cs +++ b/src/PepperDash.Core/Conversion/Convert.cs @@ -6,13 +6,22 @@ using Crestron.SimplSharp; namespace PepperDash.Core { + /// + /// Represents a EncodingHelper + /// public class EncodingHelper { + /// + /// ConvertUtf8ToAscii method + /// public static string ConvertUtf8ToAscii(string utf8String) { return Encoding.ASCII.GetString(Encoding.UTF8.GetBytes(utf8String), 0, utf8String.Length); } + /// + /// ConvertUtf8ToUtf16 method + /// public static string ConvertUtf8ToUtf16(string utf8String) { return Encoding.Unicode.GetString(Encoding.UTF8.GetBytes(utf8String), 0, utf8String.Length); diff --git a/src/PepperDash.Core/Device.cs b/src/PepperDash.Core/Device.cs index ef9f6111..a33ab594 100644 --- a/src/PepperDash.Core/Device.cs +++ b/src/PepperDash.Core/Device.cs @@ -8,6 +8,9 @@ namespace PepperDash.Core /// /// The core event and status-bearing class that most if not all device and connectors can derive from. /// + /// + /// Represents a Device + /// public class Device : IKeyName { @@ -18,6 +21,9 @@ namespace PepperDash.Core /// /// Name of the devie /// + /// + /// Gets or sets the Name + /// public string Name { get; protected set; } /// /// @@ -86,6 +92,9 @@ namespace PepperDash.Core /// Adds a post activation action /// /// + /// + /// AddPostActivationAction method + /// public void AddPostActivationAction(Action act) { if (_PostActivationActions == null) @@ -96,6 +105,9 @@ namespace PepperDash.Core /// /// Executes the preactivation actions /// + /// + /// PreActivate method + /// public void PreActivate() { if (_PreActivationActions != null) @@ -117,6 +129,9 @@ namespace PepperDash.Core /// all post-activation at end. Classes needing additional logic to /// run should override CustomActivate() /// + /// + /// Activate method + /// public bool Activate() { //if (_PreActivationActions != null) @@ -130,6 +145,9 @@ namespace PepperDash.Core /// /// Executes the postactivation actions /// + /// + /// PostActivate method + /// public void PostActivate() { if (_PostActivationActions != null) @@ -152,6 +170,9 @@ namespace PepperDash.Core /// do not need to call base.CustomActivate() /// /// true if device activated successfully. + /// + /// CustomActivate method + /// public virtual bool CustomActivate() { return true; } /// @@ -178,12 +199,15 @@ namespace PepperDash.Core if (o is bool && !(bool)o) a(); } - /// - /// Returns a string representation of the object, including its key and name. - /// - /// The returned string is formatted as "{Key} - {Name}". If the Name property is - /// null or empty, "---" is used in place of the name. + /// + /// Returns a string representation of the object, including its key and name. + /// + /// The returned string is formatted as "{Key} - {Name}". If the Name property is + /// null or empty, "---" is used in place of the name. /// A string that represents the object, containing the key and name in the format "{Key} - {Name}". + /// + /// ToString method + /// public override string ToString() { return string.Format("{0} - {1}", Key, string.IsNullOrEmpty(Name) ? "---" : Name); diff --git a/src/PepperDash.Core/EthernetHelper.cs b/src/PepperDash.Core/EthernetHelper.cs index 88429886..120a7505 100644 --- a/src/PepperDash.Core/EthernetHelper.cs +++ b/src/PepperDash.Core/EthernetHelper.cs @@ -7,6 +7,9 @@ namespace PepperDash.Core /// /// Class to help with accessing values from the CrestronEthernetHelper class /// + /// + /// Represents a EthernetHelper + /// public class EthernetHelper { /// @@ -27,6 +30,9 @@ namespace PepperDash.Core /// /// /// + /// + /// Gets or sets the PortNumber + /// public int PortNumber { get; private set; } private EthernetHelper(int portNumber) diff --git a/src/PepperDash.Core/EventArgs.cs b/src/PepperDash.Core/EventArgs.cs index 29ef13a8..dace1314 100644 --- a/src/PepperDash.Core/EventArgs.cs +++ b/src/PepperDash.Core/EventArgs.cs @@ -19,16 +19,25 @@ namespace PepperDash.Core /// /// Boolean ushort value property /// + /// + /// Gets or sets the IntValue + /// public ushort IntValue { get { return (ushort)(State ? 1 : 0); } } /// /// Boolean change event args type /// + /// + /// Gets or sets the Type + /// public ushort Type { get; set; } /// /// Boolean change event args index /// + /// + /// Gets or sets the Index + /// public ushort Index { get; set; } /// @@ -67,6 +76,9 @@ namespace PepperDash.Core /// /// Ushort change event args /// + /// + /// Represents a UshrtChangeEventArgs + /// public class UshrtChangeEventArgs : EventArgs { /// @@ -77,11 +89,17 @@ namespace PepperDash.Core /// /// Ushort change event args type /// + /// + /// Gets or sets the Type + /// public ushort Type { get; set; } /// /// Ushort change event args index /// + /// + /// Gets or sets the Index + /// public ushort Index { get; set; } /// @@ -120,6 +138,9 @@ namespace PepperDash.Core /// /// String change event args /// + /// + /// Represents a StringChangeEventArgs + /// public class StringChangeEventArgs : EventArgs { /// @@ -130,11 +151,17 @@ namespace PepperDash.Core /// /// String change event args type /// + /// + /// Gets or sets the Type + /// public ushort Type { get; set; } /// /// string change event args index /// + /// + /// Gets or sets the Index + /// public ushort Index { get; set; } /// diff --git a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs index ed02ccb0..e460e75d 100644 --- a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs +++ b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs @@ -35,11 +35,17 @@ namespace PepperDash.Core.JsonStandardObjects /// /// Device change event args type /// + /// + /// Gets or sets the Type + /// public ushort Type { get; set; } /// /// Device change event args index /// + /// + /// Gets or sets the Index + /// public ushort Index { get; set; } /// diff --git a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs index 3abfd36a..2ad47e27 100644 --- a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs +++ b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDevice.cs @@ -58,6 +58,9 @@ namespace PepperDash.Core.JsonStandardObjects /// /// /// + /// + /// Initialize method + /// public void Initialize(string uniqueID, string deviceKey) { // S+ set EvaluateFb low diff --git a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs index fa23d87e..83e2df6c 100644 --- a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs +++ b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs @@ -50,11 +50,17 @@ namespace PepperDash.Core.JsonStandardObjects /// /// Device communication parameter class /// + /// + /// Represents a ComParamsConfig + /// public class ComParamsConfig { /// /// /// + /// + /// Gets or sets the baudRate + /// public int baudRate { get; set; } /// /// @@ -89,10 +95,16 @@ namespace PepperDash.Core.JsonStandardObjects /// /// /// + /// + /// Gets or sets the simplBaudRate + /// public ushort simplBaudRate { get { return Convert.ToUInt16(baudRate); } } /// /// /// + /// + /// Gets or sets the simplDataBits + /// public ushort simplDataBits { get { return Convert.ToUInt16(dataBits); } } /// /// @@ -146,10 +158,16 @@ namespace PepperDash.Core.JsonStandardObjects /// /// /// + /// + /// Gets or sets the simplPort + /// public ushort simplPort { get { return Convert.ToUInt16(port); } } /// /// /// + /// + /// Gets or sets the simplAutoReconnect + /// public ushort simplAutoReconnect { get { return (ushort)(autoReconnect ? 1 : 0); } } /// /// @@ -195,6 +213,9 @@ namespace PepperDash.Core.JsonStandardObjects /// /// /// + /// + /// Gets or sets the simplControlPortNumber + /// public ushort simplControlPortNumber { get { return Convert.ToUInt16(controlPortNumber); } } /// @@ -210,6 +231,9 @@ namespace PepperDash.Core.JsonStandardObjects /// /// Device properties class /// + /// + /// Represents a PropertiesConfig + /// public class PropertiesConfig { /// @@ -229,10 +253,16 @@ namespace PepperDash.Core.JsonStandardObjects /// /// /// + /// + /// Gets or sets the simplDeviceId + /// public ushort simplDeviceId { get { return Convert.ToUInt16(deviceId); } } /// /// /// + /// + /// Gets or sets the simplEnabled + /// public ushort simplEnabled { get { return (ushort)(enabled ? 1 : 0); } } /// diff --git a/src/PepperDash.Core/JsonToSimpl/Constants.cs b/src/PepperDash.Core/JsonToSimpl/Constants.cs index d87b50c2..5cdf9cb2 100644 --- a/src/PepperDash.Core/JsonToSimpl/Constants.cs +++ b/src/PepperDash.Core/JsonToSimpl/Constants.cs @@ -91,6 +91,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// Gets or sets the ValueType + /// public SPlusType ValueType { get; private set; } /// /// @@ -125,6 +128,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// S+ types enum /// + /// + /// Enumeration of SPlusType values + /// public enum SPlusType { /// diff --git a/src/PepperDash.Core/JsonToSimpl/Global.cs b/src/PepperDash.Core/JsonToSimpl/Global.cs index 8392fa61..6833096b 100644 --- a/src/PepperDash.Core/JsonToSimpl/Global.cs +++ b/src/PepperDash.Core/JsonToSimpl/Global.cs @@ -23,6 +23,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// New master to add /// + /// + /// AddMaster method + /// public static void AddMaster(JsonToSimplMaster master) { if (master == null) @@ -52,6 +55,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Gets a master by its key. Case-insensitive /// + /// + /// GetMasterByFile method + /// public static JsonToSimplMaster GetMasterByFile(string file) { return Masters.FirstOrDefault(m => m.UniqueID.Equals(file, StringComparison.OrdinalIgnoreCase)); diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs index c94dad29..00c6999f 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs @@ -8,6 +8,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Used to interact with an array of values with the S+ modules /// + /// + /// Represents a JsonToSimplArrayLookupChild + /// public class JsonToSimplArrayLookupChild : JsonToSimplChildObjectBase { /// @@ -79,6 +82,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Process all values /// + /// + /// ProcessAll method + /// public override void ProcessAll() { if (FindInArray()) diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs index 5aa67c96..e13e117f 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs @@ -31,11 +31,17 @@ namespace PepperDash.Core.JsonToSimpl /// /// Use a callback to reduce task switch/threading /// + /// + /// Gets or sets the SetAllPathsDelegate + /// public SPlusValuesDelegate SetAllPathsDelegate { get; set; } /// /// Unique identifier for instance /// + /// + /// Gets or sets the Key + /// public string Key { get; protected set; } /// @@ -52,6 +58,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Indicates if the instance is linked to an object /// + /// + /// Gets or sets the LinkedToObject + /// public bool LinkedToObject { get; protected set; } /// @@ -96,6 +105,9 @@ namespace PepperDash.Core.JsonToSimpl /// Sets the path prefix for the object /// /// + /// + /// SetPathPrefix method + /// public void SetPathPrefix(string pathPrefix) { PathPrefix = pathPrefix; @@ -113,6 +125,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Set the JPath for a ushort out index. /// + /// + /// SetUshortPath method + /// public void SetUshortPath(ushort index, string path) { Debug.Console(1, "JSON Child[{0}] SetUshortPath {1}={2}", Key, index, path); @@ -123,6 +138,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Set the JPath for a string output index. /// + /// + /// SetStringPath method + /// public void SetStringPath(ushort index, string path) { Debug.Console(1, "JSON Child[{0}] SetStringPath {1}={2}", Key, index, path); @@ -134,6 +152,9 @@ namespace PepperDash.Core.JsonToSimpl /// Evalutates all outputs with defined paths. called by S+ when paths are ready to process /// and by Master when file is read. /// + /// + /// ProcessAll method + /// public virtual void ProcessAll() { if (!LinkedToObject) @@ -277,6 +298,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// USetBoolValue method + /// public void USetBoolValue(ushort key, ushort theValue) { SetBoolValue(key, theValue == 1); @@ -287,6 +311,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetBoolValue method + /// public void SetBoolValue(ushort key, bool theValue) { if (BoolPaths.ContainsKey(key)) @@ -298,6 +325,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetUShortValue method + /// public void SetUShortValue(ushort key, ushort theValue) { if (UshortPaths.ContainsKey(key)) @@ -309,6 +339,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetStringValue method + /// public void SetStringValue(ushort key, string theValue) { if (StringPaths.ContainsKey(key)) @@ -320,6 +353,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// SetValueOnMaster method + /// public void SetValueOnMaster(string keyPath, JValue valueToSave) { var path = GetFullPath(keyPath); diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs index 411fbdc5..d26ae5b5 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs @@ -22,11 +22,17 @@ namespace PepperDash.Core.JsonToSimpl /// /// Filepath to the actual file that will be read (Portal or local) /// + /// + /// Gets or sets the ActualFilePath + /// public string ActualFilePath { get; private set; } /// /// /// + /// + /// Gets or sets the Filename + /// public string Filename { get; private set; } /// /// @@ -194,6 +200,9 @@ namespace PepperDash.Core.JsonToSimpl /// Sets the debug level /// /// + /// + /// setDebugLevel method + /// public void setDebugLevel(uint level) { Debug.SetDebugLevel(level); diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs index 3e69ed9d..2c69f055 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs @@ -5,6 +5,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// Represents a JsonToSimplFixedPathObject + /// public class JsonToSimplFixedPathObject : JsonToSimplChildObjectBase { /// diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs index e0f42f8e..27607335 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs @@ -8,6 +8,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Generic Master /// + /// + /// Represents a JsonToSimplGenericMaster + /// public class JsonToSimplGenericMaster : JsonToSimplMaster { /*****************************************************************************************/ @@ -23,6 +26,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Callback action for saving /// + /// + /// Gets or sets the SaveCallback + /// public Action SaveCallback { get; set; } /*****************************************************************************************/ @@ -60,6 +66,9 @@ namespace PepperDash.Core.JsonToSimpl /// Loads JSON into JsonObject, but does not trigger evaluation by children /// /// + /// + /// SetJsonWithoutEvaluating method + /// public void SetJsonWithoutEvaluating(string json) { try @@ -75,6 +84,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// Save method + /// public override void Save() { // this code is duplicated in the other masters!!!!!!!!!!!!! diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs index 2f872e41..73259d08 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs @@ -41,6 +41,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// A unique ID /// + /// + /// Gets or sets the UniqueID + /// public string UniqueID { get; protected set; } /// @@ -57,6 +60,9 @@ namespace PepperDash.Core.JsonToSimpl /// This will be prepended to all paths to allow path swapping or for more organized /// sub-paths /// + /// + /// Gets or sets the PathPrefix + /// public string PathPrefix { get; set; } /// @@ -86,6 +92,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// Gets or sets the JsonObject + /// public JObject JsonObject { get; protected set; } /*****************************************************************************************/ @@ -120,6 +129,9 @@ namespace PepperDash.Core.JsonToSimpl /// Adds a child "module" to this master /// /// + /// + /// AddChild method + /// public void AddChild(JsonToSimplChildObjectBase child) { if (!Children.Contains(child)) @@ -131,6 +143,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// Called from the child to add changed or new values for saving /// + /// + /// AddUnsavedValue method + /// public void AddUnsavedValue(string path, JValue value) { if (UnsavedValues.ContainsKey(path)) @@ -179,6 +194,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// ParseArray method + /// public static JArray ParseArray(string json) { #if NET6_0 diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs index c170a9a1..8eae90ed 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs @@ -21,6 +21,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// File path of the actual file being read (Portal or local) /// + /// + /// Gets or sets the ActualFilePath + /// public string ActualFilePath { get; private set; } /*****************************************************************************************/ @@ -128,6 +131,9 @@ namespace PepperDash.Core.JsonToSimpl /// /// /// + /// + /// setDebugLevel method + /// public void setDebugLevel(uint level) { Debug.SetDebugLevel(level); diff --git a/src/PepperDash.Core/Logging/CrestronEnricher.cs b/src/PepperDash.Core/Logging/CrestronEnricher.cs index 902ce8d5..c25306ca 100644 --- a/src/PepperDash.Core/Logging/CrestronEnricher.cs +++ b/src/PepperDash.Core/Logging/CrestronEnricher.cs @@ -9,6 +9,9 @@ using System.Threading.Tasks; namespace PepperDash.Core.Logging { + /// + /// Represents a CrestronEnricher + /// public class CrestronEnricher : ILogEventEnricher { static readonly string _appName; @@ -27,6 +30,9 @@ namespace PepperDash.Core.Logging } + /// + /// Enrich method + /// public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) { var property = propertyFactory.CreateProperty("App", _appName); diff --git a/src/PepperDash.Core/Logging/Debug.cs b/src/PepperDash.Core/Logging/Debug.cs index 38dfa034..3362a065 100644 --- a/src/PepperDash.Core/Logging/Debug.cs +++ b/src/PepperDash.Core/Logging/Debug.cs @@ -80,11 +80,17 @@ namespace PepperDash.Core /// /// Debug level to set for a given program. /// + /// + /// Gets or sets the Level + /// public static int Level { get; private set; } /// /// When this is true, the configuration file will NOT be loaded until triggered by either a console command or a signal /// + /// + /// Gets or sets the DoNotLoadConfigOnNextBoot + /// public static bool DoNotLoadConfigOnNextBoot { get; private set; } private static DebugContextCollection _contexts; @@ -96,6 +102,9 @@ namespace PepperDash.Core /// /// Version for the currently loaded PepperDashCore dll /// + /// + /// Gets or sets the PepperDashCoreVersion + /// public static string PepperDashCoreVersion { get; private set; } private static CTimer _saveTimer; @@ -233,6 +242,9 @@ namespace PepperDash.Core }; } + /// + /// UpdateLoggerConfiguration method + /// public static void UpdateLoggerConfiguration(LoggerConfiguration config) { _loggerConfiguration = config; @@ -240,6 +252,9 @@ namespace PepperDash.Core _logger = config.CreateLogger(); } + /// + /// ResetLoggerConfiguration method + /// public static void ResetLoggerConfiguration() { _loggerConfiguration = _defaultLoggerConfiguration; @@ -319,6 +334,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDebugFromConsole method + /// public static void SetDebugFromConsole(string levelString) { try @@ -371,6 +389,9 @@ namespace PepperDash.Core /// Sets the debug level /// /// Valid values 0-5 + /// + /// SetDebugLevel method + /// public static void SetDebugLevel(uint level) { if(!_logLevels.TryGetValue(level, out var logLevel)) @@ -385,6 +406,9 @@ namespace PepperDash.Core SetDebugLevel(logLevel); } + /// + /// SetDebugLevel method + /// public static void SetDebugLevel(LogEventLevel level) { _consoleLoggingLevelSwitch.MinimumLevel = level; @@ -402,6 +426,9 @@ namespace PepperDash.Core CrestronConsole.PrintLine($"Error saving console debug level setting: {err}"); } + /// + /// SetWebSocketMinimumDebugLevel method + /// public static void SetWebSocketMinimumDebugLevel(LogEventLevel level) { _websocketLoggingLevelSwitch.MinimumLevel = level; @@ -414,6 +441,9 @@ namespace PepperDash.Core LogMessage(LogEventLevel.Information, "Websocket debug level set to {0}", _websocketLoggingLevelSwitch.MinimumLevel); } + /// + /// SetErrorLogMinimumDebugLevel method + /// public static void SetErrorLogMinimumDebugLevel(LogEventLevel level) { _errorLogLevelSwitch.MinimumLevel = level; @@ -426,6 +456,9 @@ namespace PepperDash.Core LogMessage(LogEventLevel.Information, "Error log debug level set to {0}", _websocketLoggingLevelSwitch.MinimumLevel); } + /// + /// SetFileMinimumDebugLevel method + /// public static void SetFileMinimumDebugLevel(LogEventLevel level) { _errorLogLevelSwitch.MinimumLevel = level; @@ -442,6 +475,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDoNotLoadOnNextBootFromConsole method + /// public static void SetDoNotLoadOnNextBootFromConsole(string stateString) { try @@ -464,6 +500,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDebugFilterFromConsole method + /// public static void SetDebugFilterFromConsole(string items) { var str = items.Trim(); @@ -559,6 +598,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetDeviceDebugSettingsForKey method + /// public static object GetDeviceDebugSettingsForKey(string deviceKey) { return _contexts.GetDebugSettingsForKey(deviceKey); @@ -581,6 +623,9 @@ namespace PepperDash.Core /// /// /// + /// + /// ShowDebugLog method + /// public static void ShowDebugLog(string s) { var loglist = CrestronLogger.PrintTheLog(s.ToLower() == "all"); @@ -595,6 +640,9 @@ namespace PepperDash.Core /// Message template /// Optional IKeyed device. If provided, the Key of the device will be added to the log message /// Args to put into message template + /// + /// LogMessage method + /// public static void LogMessage(Exception ex, string message, IKeyed device = null, params object[] args) { using (LogContext.PushProperty("Key", device?.Key)) @@ -623,16 +671,25 @@ namespace PepperDash.Core _logger.Write(level, message, args); } + /// + /// LogMessage method + /// public static void LogMessage(LogEventLevel level, Exception ex, string message, params object[] args) { _logger.Write(level, ex, message, args); } + /// + /// LogMessage method + /// public static void LogMessage(LogEventLevel level, IKeyed keyed, string message, params object[] args) { LogMessage(level, message, keyed, args); } + /// + /// LogMessage method + /// public static void LogMessage(LogEventLevel level, Exception ex, IKeyed device, string message, params object[] args) { using (LogContext.PushProperty("Key", device?.Key)) @@ -642,6 +699,9 @@ namespace PepperDash.Core } #region Explicit methods for logging levels + /// + /// LogVerbose method + /// public static void LogVerbose(IKeyed keyed, string message, params object[] args) { using(LogContext.PushProperty("Key", keyed?.Key)) @@ -650,6 +710,9 @@ namespace PepperDash.Core } } + /// + /// LogVerbose method + /// public static void LogVerbose(Exception ex, IKeyed keyed, string message, params object[] args) { using(LogContext.PushProperty("Key", keyed?.Key)) @@ -658,16 +721,25 @@ namespace PepperDash.Core } } + /// + /// LogVerbose method + /// public static void LogVerbose(string message, params object[] args) { _logger.Write(LogEventLevel.Verbose, message, args); } + /// + /// LogVerbose method + /// public static void LogVerbose(Exception ex, string message, params object[] args) { _logger.Write(LogEventLevel.Verbose, ex, null, message, args); } + /// + /// LogDebug method + /// public static void LogDebug(IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -676,6 +748,9 @@ namespace PepperDash.Core } } + /// + /// LogDebug method + /// public static void LogDebug(Exception ex, IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -684,16 +759,25 @@ namespace PepperDash.Core } } + /// + /// LogDebug method + /// public static void LogDebug(string message, params object[] args) { _logger.Write(LogEventLevel.Debug, message, args); } + /// + /// LogDebug method + /// public static void LogDebug(Exception ex, string message, params object[] args) { _logger.Write(LogEventLevel.Debug, ex, null, message, args); } + /// + /// LogInformation method + /// public static void LogInformation(IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -702,6 +786,9 @@ namespace PepperDash.Core } } + /// + /// LogInformation method + /// public static void LogInformation(Exception ex, IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -710,16 +797,25 @@ namespace PepperDash.Core } } + /// + /// LogInformation method + /// public static void LogInformation(string message, params object[] args) { _logger.Write(LogEventLevel.Information, message, args); } + /// + /// LogInformation method + /// public static void LogInformation(Exception ex, string message, params object[] args) { _logger.Write(LogEventLevel.Information, ex, null, message, args); } + /// + /// LogWarning method + /// public static void LogWarning(IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -728,6 +824,9 @@ namespace PepperDash.Core } } + /// + /// LogWarning method + /// public static void LogWarning(Exception ex, IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -736,16 +835,25 @@ namespace PepperDash.Core } } + /// + /// LogWarning method + /// public static void LogWarning(string message, params object[] args) { _logger.Write(LogEventLevel.Warning, message, args); } + /// + /// LogWarning method + /// public static void LogWarning(Exception ex, string message, params object[] args) { _logger.Write(LogEventLevel.Warning, ex, null, message, args); } + /// + /// LogError method + /// public static void LogError(IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -754,6 +862,9 @@ namespace PepperDash.Core } } + /// + /// LogError method + /// public static void LogError(Exception ex, IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -762,16 +873,25 @@ namespace PepperDash.Core } } + /// + /// LogError method + /// public static void LogError(string message, params object[] args) { _logger.Write(LogEventLevel.Error, message, args); } + /// + /// LogError method + /// public static void LogError(Exception ex, string message, params object[] args) { _logger.Write(LogEventLevel.Error, ex, null, message, args); } + /// + /// LogFatal method + /// public static void LogFatal(IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -780,6 +900,9 @@ namespace PepperDash.Core } } + /// + /// LogFatal method + /// public static void LogFatal(Exception ex, IKeyed keyed, string message, params object[] args) { using (LogContext.PushProperty("Key", keyed?.Key)) @@ -788,11 +911,17 @@ namespace PepperDash.Core } } + /// + /// LogFatal method + /// public static void LogFatal(string message, params object[] args) { _logger.Write(LogEventLevel.Fatal, message, args); } + /// + /// LogFatal method + /// public static void LogFatal(Exception ex, string message, params object[] args) { _logger.Write(LogEventLevel.Fatal, ex, null, message, args); @@ -869,6 +998,9 @@ namespace PepperDash.Core /// Logs to Console when at-level, and all messages to error log /// [Obsolete("Use LogMessage methods, Will be removed in 2.2.0 and later versions")] + /// + /// Console method + /// public static void Console(uint level, ErrorLogLevel errorLogLevel, string format, params object[] items) { @@ -881,6 +1013,9 @@ namespace PepperDash.Core /// it will only be written to the log. /// [Obsolete("Use LogMessage methods, Will be removed in 2.2.0 and later versions")] + /// + /// ConsoleWithLog method + /// public static void ConsoleWithLog(uint level, string format, params object[] items) { LogMessage(level, format, items); @@ -1005,6 +1140,9 @@ namespace PepperDash.Core /// /// Error level to for message to be logged at /// + /// + /// Enumeration of ErrorLogLevel values + /// public enum ErrorLogLevel { /// diff --git a/src/PepperDash.Core/Logging/DebugConsoleSink.cs b/src/PepperDash.Core/Logging/DebugConsoleSink.cs index a6c7f893..6363caa5 100644 --- a/src/PepperDash.Core/Logging/DebugConsoleSink.cs +++ b/src/PepperDash.Core/Logging/DebugConsoleSink.cs @@ -11,10 +11,16 @@ using System.Text; namespace PepperDash.Core { + /// + /// Represents a DebugConsoleSink + /// public class DebugConsoleSink : ILogEventSink { private readonly ITextFormatter _textFormatter; + /// + /// Emit method + /// public void Emit(LogEvent logEvent) { if (!Debug.IsRunningOnAppliance) return; @@ -44,6 +50,9 @@ namespace PepperDash.Core public static class DebugConsoleSinkExtensions { + /// + /// DebugConsoleSink method + /// public static LoggerConfiguration DebugConsoleSink( this LoggerSinkConfiguration loggerConfiguration, ITextFormatter formatProvider = null) diff --git a/src/PepperDash.Core/Logging/DebugContext.cs b/src/PepperDash.Core/Logging/DebugContext.cs index 54c87414..88567eff 100644 --- a/src/PepperDash.Core/Logging/DebugContext.cs +++ b/src/PepperDash.Core/Logging/DebugContext.cs @@ -38,6 +38,9 @@ namespace PepperDash.Core /// /// /// + /// + /// GetDebugContext method + /// public static DebugContext GetDebugContext(string key) { var context = Contexts.FirstOrDefault(c => c.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); @@ -92,6 +95,9 @@ namespace PepperDash.Core /// Callback for console command /// /// + /// + /// SetDebugFromConsole method + /// public void SetDebugFromConsole(string levelString) { try @@ -114,6 +120,9 @@ namespace PepperDash.Core /// Sets the debug level /// /// Valid values 0 (no debug), 1 (critical), 2 (all messages) + /// + /// SetDebugLevel method + /// public void SetDebugLevel(int level) { if (level <= 2) @@ -143,6 +152,9 @@ namespace PepperDash.Core /// /// Appends a device Key to the beginning of a message /// + /// + /// Console method + /// public void Console(uint level, IKeyed dev, string format, params object[] items) { if (SaveData.Level >= level) @@ -191,6 +203,9 @@ namespace PepperDash.Core /// /// /// + /// + /// LogError method + /// public void LogError(Debug.ErrorLogLevel errorLogLevel, string str) { string msg = string.Format("App {0}:{1}", InitialParametersClass.ApplicationNumber, str); diff --git a/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs b/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs index 0814453b..76859209 100644 --- a/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs +++ b/src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs @@ -5,8 +5,14 @@ using Serilog.Events; namespace PepperDash.Core.Logging { + /// + /// Represents a DebugCrestronLoggerSink + /// public class DebugCrestronLoggerSink : ILogEventSink { + /// + /// Emit method + /// public void Emit(LogEvent logEvent) { if (!Debug.IsRunningOnAppliance) return; diff --git a/src/PepperDash.Core/Logging/DebugErrorLogSink.cs b/src/PepperDash.Core/Logging/DebugErrorLogSink.cs index 3885982b..9ab4dc6b 100644 --- a/src/PepperDash.Core/Logging/DebugErrorLogSink.cs +++ b/src/PepperDash.Core/Logging/DebugErrorLogSink.cs @@ -11,6 +11,9 @@ using System.Threading.Tasks; namespace PepperDash.Core.Logging { + /// + /// Represents a DebugErrorLogSink + /// public class DebugErrorLogSink : ILogEventSink { private ITextFormatter _formatter; @@ -24,6 +27,9 @@ namespace PepperDash.Core.Logging {LogEventLevel.Error, (msg) => ErrorLog.Error(msg) }, {LogEventLevel.Fatal, (msg) => ErrorLog.Error(msg) } }; + /// + /// Emit method + /// public void Emit(LogEvent logEvent) { string message; diff --git a/src/PepperDash.Core/Logging/DebugExtensions.cs b/src/PepperDash.Core/Logging/DebugExtensions.cs index a8b7bd55..c5174541 100644 --- a/src/PepperDash.Core/Logging/DebugExtensions.cs +++ b/src/PepperDash.Core/Logging/DebugExtensions.cs @@ -6,66 +6,105 @@ namespace PepperDash.Core.Logging { public static class DebugExtensions { + /// + /// LogException method + /// public static void LogException(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(ex, message, device, args); } + /// + /// LogVerbose method + /// public static void LogVerbose(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(LogEventLevel.Verbose, ex, message, device, args); } + /// + /// LogVerbose method + /// public static void LogVerbose(this IKeyed device, string message, params object[] args) { Log.LogMessage(LogEventLevel.Verbose, device, message, args); } + /// + /// LogDebug method + /// public static void LogDebug(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(LogEventLevel.Debug, ex, message, device, args); } + /// + /// LogDebug method + /// public static void LogDebug(this IKeyed device, string message, params object[] args) { Log.LogMessage(LogEventLevel.Debug, device, message, args); } + /// + /// LogInformation method + /// public static void LogInformation(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(LogEventLevel.Information, ex, message, device, args); } + /// + /// LogInformation method + /// public static void LogInformation(this IKeyed device, string message, params object[] args) { Log.LogMessage(LogEventLevel.Information, device, message, args); } + /// + /// LogWarning method + /// public static void LogWarning(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(LogEventLevel.Warning, ex, message, device, args); } + /// + /// LogWarning method + /// public static void LogWarning(this IKeyed device, string message, params object[] args) { Log.LogMessage(LogEventLevel.Warning, device, message, args); } + /// + /// LogError method + /// public static void LogError(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(LogEventLevel.Error, ex, message, device, args); } + /// + /// LogError method + /// public static void LogError(this IKeyed device, string message, params object[] args) { Log.LogMessage(LogEventLevel.Error, device, message, args); } + /// + /// LogFatal method + /// public static void LogFatal(this IKeyed device, Exception ex, string message, params object[] args) { Log.LogMessage(LogEventLevel.Fatal, ex, message, device, args); } + /// + /// LogFatal method + /// public static void LogFatal(this IKeyed device, string message, params object[] args) { Log.LogMessage(LogEventLevel.Fatal, device, message, args); diff --git a/src/PepperDash.Core/Logging/DebugMemory.cs b/src/PepperDash.Core/Logging/DebugMemory.cs index a5737af9..e1894816 100644 --- a/src/PepperDash.Core/Logging/DebugMemory.cs +++ b/src/PepperDash.Core/Logging/DebugMemory.cs @@ -7,6 +7,9 @@ namespace PepperDash.Core.Logging /// /// Class to persist current Debug settings across program restarts /// + /// + /// Represents a DebugContextCollection + /// public class DebugContextCollection { /// @@ -39,6 +42,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// SetLevel method + /// public void SetLevel(string contextKey, int level) { if (level < 0 || level > 2) @@ -51,6 +57,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// GetOrCreateItem method + /// public DebugContextItem GetOrCreateItem(string contextKey) { if (!_items.ContainsKey(contextKey)) @@ -65,6 +74,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// SetDebugSettingsForKey method + /// public void SetDebugSettingsForKey(string deviceKey, object settings) { try @@ -89,6 +101,9 @@ namespace PepperDash.Core.Logging /// /// /// + /// + /// GetDebugSettingsForKey method + /// public object GetDebugSettingsForKey(string deviceKey) { return DeviceDebugSettings[deviceKey]; diff --git a/src/PepperDash.Core/Logging/DebugWebsocketSink.cs b/src/PepperDash.Core/Logging/DebugWebsocketSink.cs index d818977e..9c3df14e 100644 --- a/src/PepperDash.Core/Logging/DebugWebsocketSink.cs +++ b/src/PepperDash.Core/Logging/DebugWebsocketSink.cs @@ -21,6 +21,9 @@ using Serilog.Formatting.Json; namespace PepperDash.Core { + /// + /// Represents a DebugWebsocketSink + /// public class DebugWebsocketSink : ILogEventSink { private HttpServer _httpsServer; @@ -47,6 +50,9 @@ namespace PepperDash.Core } } + /// + /// Gets or sets the IsRunning + /// public bool IsRunning { get => _httpsServer?.IsListening ?? false; } @@ -105,6 +111,9 @@ namespace PepperDash.Core } } + /// + /// Emit method + /// public void Emit(LogEvent logEvent) { if (_httpsServer == null || !_httpsServer.IsListening) return; @@ -116,6 +125,9 @@ namespace PepperDash.Core } + /// + /// StartServerAndSetPort method + /// public void StartServerAndSetPort(int port) { Debug.Console(0, "Starting Websocket Server on port: {0}", port); @@ -193,6 +205,9 @@ namespace PepperDash.Core } } + /// + /// StopServer method + /// public void StopServer() { Debug.Console(0, "Stopping Websocket Server"); @@ -204,6 +219,9 @@ namespace PepperDash.Core public static class DebugWebsocketSinkExtensions { + /// + /// DebugWebsocketSink method + /// public static LoggerConfiguration DebugWebsocketSink( this LoggerSinkConfiguration loggerConfiguration, ITextFormatter formatProvider = null) @@ -212,6 +230,9 @@ namespace PepperDash.Core } } + /// + /// Represents a DebugClient + /// public class DebugClient : WebSocketBehavior { private DateTime _connectionTime; diff --git a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs index 225a563c..0df95c29 100644 --- a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs +++ b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs @@ -5,6 +5,9 @@ namespace PepperDash.Core.PasswordManagement /// /// A class to allow user interaction with the PasswordManager /// + /// + /// Represents a PasswordClient + /// public class PasswordClient { /// @@ -59,6 +62,9 @@ namespace PepperDash.Core.PasswordManagement /// Retrieve password by index /// /// + /// + /// GetPasswordByIndex method + /// public void GetPasswordByIndex(ushort key) { OnUshrtChange((ushort)PasswordManager.Passwords.Count, 0, PasswordManagementConstants.PasswordManagerCountChange); @@ -81,6 +87,9 @@ namespace PepperDash.Core.PasswordManagement /// Password validation method /// /// + /// + /// ValidatePassword method + /// public void ValidatePassword(string password) { if (string.IsNullOrEmpty(password)) @@ -99,6 +108,9 @@ namespace PepperDash.Core.PasswordManagement /// password against the selected password when the length of the 2 are equal /// /// + /// + /// BuildPassword method + /// public void BuildPassword(string data) { PasswordToValidate = String.Concat(PasswordToValidate, data); @@ -111,6 +123,9 @@ namespace PepperDash.Core.PasswordManagement /// /// Clears the user entered password and resets the LEDs /// + /// + /// ClearPassword method + /// public void ClearPassword() { PasswordToValidate = ""; diff --git a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs index d15ac1e1..6ec4583b 100644 --- a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs +++ b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs @@ -7,6 +7,9 @@ namespace PepperDash.Core.PasswordManagement /// /// Allows passwords to be stored and managed /// + /// + /// Represents a PasswordManager + /// public class PasswordManager { /// @@ -71,6 +74,9 @@ namespace PepperDash.Core.PasswordManagement /// /// /// + /// + /// UpdatePassword method + /// public void UpdatePassword(ushort key, string password) { // validate the parameters @@ -152,6 +158,9 @@ namespace PepperDash.Core.PasswordManagement /// Method to change the default timer value, (default 5000ms/5s) /// /// + /// + /// PasswordTimerMs method + /// public void PasswordTimerMs(ushort time) { PasswordTimerElapsedMs = Convert.ToInt64(time); diff --git a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs index cc71e303..61c0d689 100644 --- a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs +++ b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs @@ -71,6 +71,9 @@ namespace PepperDash.Core.SystemInfo /// /// Processor Change Event Args Class /// + /// + /// Represents a ProcessorChangeEventArgs + /// public class ProcessorChangeEventArgs : EventArgs { /// @@ -117,6 +120,9 @@ namespace PepperDash.Core.SystemInfo /// /// Ethernet Change Event Args Class /// + /// + /// Represents a EthernetChangeEventArgs + /// public class EthernetChangeEventArgs : EventArgs { /// @@ -168,6 +174,9 @@ namespace PepperDash.Core.SystemInfo /// /// Control Subnet Chage Event Args Class /// + /// + /// Represents a ControlSubnetChangeEventArgs + /// public class ControlSubnetChangeEventArgs : EventArgs { /// @@ -214,6 +223,9 @@ namespace PepperDash.Core.SystemInfo /// /// Program Change Event Args Class /// + /// + /// Represents a ProgramChangeEventArgs + /// public class ProgramChangeEventArgs : EventArgs { /// diff --git a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs index 6677b9ef..65d718c6 100644 --- a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs +++ b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs @@ -103,6 +103,9 @@ namespace PepperDash.Core.SystemInfo /// /// Gets the current ethernet info /// + /// + /// GetEthernetInfo method + /// public void GetEthernetInfo() { OnBoolChange(true, 0, SystemInfoConstants.BusyBoolChange); @@ -164,6 +167,9 @@ namespace PepperDash.Core.SystemInfo /// /// Gets the current control subnet info /// + /// + /// GetControlSubnetInfo method + /// public void GetControlSubnetInfo() { OnBoolChange(true, 0, SystemInfoConstants.BusyBoolChange); @@ -206,6 +212,9 @@ namespace PepperDash.Core.SystemInfo /// Gets the program info by index /// /// + /// + /// GetProgramInfoByIndex method + /// public void GetProgramInfoByIndex(ushort index) { if (index < 1 || index > 10) @@ -266,6 +275,9 @@ namespace PepperDash.Core.SystemInfo /// /// Gets the processor uptime and passes it to S+ /// + /// + /// RefreshProcessorUptime method + /// public void RefreshProcessorUptime() { try @@ -287,6 +299,9 @@ namespace PepperDash.Core.SystemInfo /// Gets the program uptime, by index, and passes it to S+ /// /// + /// + /// RefreshProgramUptimeByIndex method + /// public void RefreshProgramUptimeByIndex(int index) { try @@ -308,6 +323,9 @@ namespace PepperDash.Core.SystemInfo /// Sends command to console, passes response back using string change event /// /// + /// + /// SendConsoleCommand method + /// public void SendConsoleCommand(string cmd) { if (string.IsNullOrEmpty(cmd)) diff --git a/src/PepperDash.Core/Web/BouncyCertificate.cs b/src/PepperDash.Core/Web/BouncyCertificate.cs index bf8b0f4c..9e885094 100644 --- a/src/PepperDash.Core/Web/BouncyCertificate.cs +++ b/src/PepperDash.Core/Web/BouncyCertificate.cs @@ -35,6 +35,9 @@ namespace PepperDash.Core return issuerCertificate; } + /// + /// IssueCertificate method + /// public X509Certificate2 IssueCertificate(string subjectName, X509Certificate2 issuerCertificate, string[] subjectAlternativeNames, KeyPurposeID[] usages) { // It's self-signed, so these are the same. @@ -56,6 +59,9 @@ namespace PepperDash.Core return ConvertCertificate(certificate, subjectKeyPair, random); } + /// + /// CreateCertificateAuthorityCertificate method + /// public X509Certificate2 CreateCertificateAuthorityCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages) { // It's self-signed, so these are the same. @@ -78,6 +84,9 @@ namespace PepperDash.Core return ConvertCertificate(certificate, subjectKeyPair, random); } + /// + /// CreateSelfSignedCertificate method + /// public X509Certificate2 CreateSelfSignedCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages) { // It's self-signed, so these are the same. @@ -305,6 +314,9 @@ namespace PepperDash.Core return convertedCertificate; } + /// + /// WriteCertificate method + /// public void WriteCertificate(X509Certificate2 certificate, string outputDirectory, string certName) { // This password is the one attached to the PFX file. Use 'null' for no password. @@ -332,6 +344,9 @@ namespace PepperDash.Core } } } + /// + /// AddCertToStore method + /// public bool AddCertToStore(X509Certificate2 cert, System.Security.Cryptography.X509Certificates.StoreName st, System.Security.Cryptography.X509Certificates.StoreLocation sl) { bool bRet = false; diff --git a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs index ca19cf2f..46ce3a96 100644 --- a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs +++ b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs @@ -5,6 +5,9 @@ namespace PepperDash.Core.Web.RequestHandlers /// /// Web API default request handler /// + /// + /// Represents a DefaultRequestHandler + /// public class DefaultRequestHandler : WebApiBaseRequestHandler { /// diff --git a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs index b1170031..927092db 100644 --- a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs +++ b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs @@ -142,6 +142,9 @@ namespace PepperDash.Core.Web.RequestHandlers /// Process request /// /// + /// + /// ProcessRequest method + /// public void ProcessRequest(HttpCwsContext context) { if (!_handlers.TryGetValue(context.Request.HttpMethod, out Func handler)) diff --git a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs index 99e4aa93..a02f3497 100644 --- a/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs +++ b/src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs @@ -144,6 +144,9 @@ namespace PepperDash.Core.Web.RequestHandlers /// Process request /// /// + /// + /// ProcessRequest method + /// public void ProcessRequest(HttpCwsContext context) { Action handler; diff --git a/src/PepperDash.Core/Web/WebApiServer.cs b/src/PepperDash.Core/Web/WebApiServer.cs index cf45b361..c8f7398f 100644 --- a/src/PepperDash.Core/Web/WebApiServer.cs +++ b/src/PepperDash.Core/Web/WebApiServer.cs @@ -28,21 +28,33 @@ namespace PepperDash.Core.Web /// /// Web API server key /// + /// + /// Gets or sets the Key + /// public string Key { get; private set; } /// /// Web API server name /// + /// + /// Gets or sets the Name + /// public string Name { get; private set; } /// /// CWS base path, will default to "/api" if not set via initialize method /// + /// + /// Gets or sets the BasePath + /// public string BasePath { get; private set; } /// /// Indicates CWS is registered with base path /// + /// + /// Gets or sets the IsRegistered + /// public bool IsRegistered { get; private set; } /// @@ -140,6 +152,9 @@ namespace PepperDash.Core.Web /// /// Initializes CWS class /// + /// + /// Initialize method + /// public void Initialize(string key, string basePath) { Key = key; @@ -165,6 +180,9 @@ namespace PepperDash.Core.Web /// Removes a route from CWS /// /// + /// + /// RemoveRoute method + /// public void RemoveRoute(HttpCwsRoute route) { if (route == null) @@ -179,6 +197,9 @@ namespace PepperDash.Core.Web /// /// Returns a list of the current routes /// + /// + /// GetRouteCollection method + /// public HttpCwsRouteCollection GetRouteCollection() { return _server.Routes; @@ -225,6 +246,9 @@ namespace PepperDash.Core.Web /// /// Stop CWS instance /// + /// + /// Stop method + /// public void Stop() { try diff --git a/src/PepperDash.Core/WebApi/Presets/Preset.cs b/src/PepperDash.Core/WebApi/Presets/Preset.cs index bdbc5820..f407a9ba 100644 --- a/src/PepperDash.Core/WebApi/Presets/Preset.cs +++ b/src/PepperDash.Core/WebApi/Presets/Preset.cs @@ -5,6 +5,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// Represents a preset /// + /// + /// Represents a Preset + /// public class Preset { /// @@ -15,26 +18,41 @@ namespace PepperDash.Core.WebApi.Presets /// /// User ID /// + /// + /// Gets or sets the UserId + /// public int UserId { get; set; } /// /// Room Type ID /// + /// + /// Gets or sets the RoomTypeId + /// public int RoomTypeId { get; set; } /// /// Preset Name /// + /// + /// Gets or sets the PresetName + /// public string PresetName { get; set; } /// /// Preset Number /// + /// + /// Gets or sets the PresetNumber + /// public int PresetNumber { get; set; } /// /// Preset Data /// + /// + /// Gets or sets the Data + /// public string Data { get; set; } /// @@ -51,6 +69,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// Represents a PresetReceivedEventArgs + /// public class PresetReceivedEventArgs : EventArgs { /// @@ -61,11 +82,17 @@ namespace PepperDash.Core.WebApi.Presets /// /// S+ helper /// + /// + /// Gets or sets the ULookupSuccess + /// public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } } /// /// The preset /// + /// + /// Gets or sets the Preset + /// public Preset Preset { get; private set; } /// diff --git a/src/PepperDash.Core/WebApi/Presets/User.cs b/src/PepperDash.Core/WebApi/Presets/User.cs index c82824f6..a7acee66 100644 --- a/src/PepperDash.Core/WebApi/Presets/User.cs +++ b/src/PepperDash.Core/WebApi/Presets/User.cs @@ -19,16 +19,25 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// Gets or sets the ExternalId + /// public string ExternalId { get; set; } /// /// /// + /// + /// Gets or sets the FirstName + /// public string FirstName { get; set; } /// /// /// + /// + /// Gets or sets the LastName + /// public string LastName { get; set; } } @@ -46,11 +55,17 @@ namespace PepperDash.Core.WebApi.Presets /// /// For stupid S+ /// + /// + /// Gets or sets the ULookupSuccess + /// public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } } /// /// /// + /// + /// Gets or sets the User + /// public User User { get; private set; } /// @@ -73,6 +88,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// Represents a UserAndRoomMessage + /// public class UserAndRoomMessage { /// @@ -83,11 +101,17 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// Gets or sets the RoomTypeId + /// public int RoomTypeId { get; set; } /// /// /// + /// + /// Gets or sets the PresetNumber + /// public int PresetNumber { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs index 0a9317bf..95ca78f0 100644 --- a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs +++ b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs @@ -28,6 +28,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// Unique identifier for this instance /// + /// + /// Gets or sets the Key + /// public string Key { get; private set; } //string JsonMasterKey; @@ -77,6 +80,9 @@ namespace PepperDash.Core.WebApi.Presets /// Gets the user for a passcode /// /// + /// + /// GetUserForPasscode method + /// public void GetUserForPasscode(string passcode) { // Bullshit duplicate code here... These two cases should be the same @@ -115,6 +121,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// GetPresetForThisUser method + /// public void GetPresetForThisUser(int roomTypeId, int presetNumber) { if (CurrentUser == null) @@ -212,6 +221,9 @@ namespace PepperDash.Core.WebApi.Presets /// /// /// + /// + /// SavePresetForThisUser method + /// public void SavePresetForThisUser(int roomTypeId, int presetNumber) { if (CurrentPreset == null) diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs index 58473362..d079ec31 100644 --- a/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs +++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs @@ -59,6 +59,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// GetTokenWithOffset method + /// public override XSigToken GetTokenWithOffset(int offset) { if (offset == 0) return this; @@ -69,6 +72,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// public override string ToString() { return Index + " = 0x" + Value.ToString("X4"); @@ -80,6 +86,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// public string ToString(string format, IFormatProvider formatProvider) { return Value.ToString(format, formatProvider); diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs index 70ccc852..b02cdfc8 100644 --- a/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs +++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs @@ -57,6 +57,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// GetTokenWithOffset method + /// public override XSigToken GetTokenWithOffset(int offset) { if (offset == 0) return this; @@ -67,6 +70,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// public override string ToString() { return Index + " = " + (Value ? "High" : "Low"); @@ -77,6 +83,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// public string ToString(IFormatProvider formatProvider) { return Value.ToString(formatProvider); diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs index 25ee3fd0..6233a79c 100644 --- a/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs +++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs @@ -63,6 +63,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// GetTokenWithOffset method + /// public override XSigToken GetTokenWithOffset(int offset) { if (offset == 0) return this; @@ -73,6 +76,9 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// /// + /// + /// ToString method + /// public override string ToString() { return Index + " = \"" + Value + "\""; diff --git a/src/PepperDash.Core/XSigUtility/XSigHelpers.cs b/src/PepperDash.Core/XSigUtility/XSigHelpers.cs index 4ea6f634..d93cc32b 100644 --- a/src/PepperDash.Core/XSigUtility/XSigHelpers.cs +++ b/src/PepperDash.Core/XSigUtility/XSigHelpers.cs @@ -52,6 +52,9 @@ namespace PepperDash.Core.Intersystem /// /// XSig state resolver. /// Bytes in XSig format for each token within the state representation. + /// + /// GetBytes method + /// public static byte[] GetBytes(IXSigSerialization xSigSerialization) { return GetBytes(xSigSerialization, 0); @@ -63,6 +66,9 @@ namespace PepperDash.Core.Intersystem /// XSig state resolver. /// Offset to which the data will be aligned. /// Bytes in XSig format for each token within the state representation. + /// + /// GetBytes method + /// public static byte[] GetBytes(IXSigSerialization xSigSerialization, int offset) { var tokens = xSigSerialization.Serialize(); @@ -82,6 +88,9 @@ namespace PepperDash.Core.Intersystem /// 1-based digital index /// Digital data to be encoded /// Bytes in XSig format for digtial information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int index, bool value) { return GetBytes(index, 0, value); @@ -94,6 +103,9 @@ namespace PepperDash.Core.Intersystem /// Index offset. /// Digital data to be encoded /// Bytes in XSig format for digtial information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int index, int offset, bool value) { return new XSigDigitalToken(index + offset, value).GetBytes(); @@ -105,6 +117,9 @@ namespace PepperDash.Core.Intersystem /// Starting index of the sequence. /// Digital signal value array. /// Byte sequence in XSig format for digital signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int startIndex, bool[] values) { return GetBytes(startIndex, 0, values); @@ -117,6 +132,9 @@ namespace PepperDash.Core.Intersystem /// Index offset. /// Digital signal value array. /// Byte sequence in XSig format for digital signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int startIndex, int offset, bool[] values) { // Digital XSig data is 2 bytes per value @@ -134,6 +152,9 @@ namespace PepperDash.Core.Intersystem /// 1-based analog index /// Analog data to be encoded /// Bytes in XSig format for analog signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int index, ushort value) { return GetBytes(index, 0, value); @@ -146,6 +167,9 @@ namespace PepperDash.Core.Intersystem /// Index offset. /// Analog data to be encoded /// Bytes in XSig format for analog signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int index, int offset, ushort value) { return new XSigAnalogToken(index + offset, value).GetBytes(); @@ -157,6 +181,9 @@ namespace PepperDash.Core.Intersystem /// Starting index of the sequence. /// Analog signal value array. /// Byte sequence in XSig format for analog signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int startIndex, ushort[] values) { return GetBytes(startIndex, 0, values); @@ -169,6 +196,9 @@ namespace PepperDash.Core.Intersystem /// Index offset. /// Analog signal value array. /// Byte sequence in XSig format for analog signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int startIndex, int offset, ushort[] values) { // Analog XSig data is 4 bytes per value @@ -186,6 +216,9 @@ namespace PepperDash.Core.Intersystem /// 1-based serial index /// Serial data to be encoded /// Bytes in XSig format for serial signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int index, string value) { return GetBytes(index, 0, value); @@ -198,6 +231,9 @@ namespace PepperDash.Core.Intersystem /// Index offset. /// Serial data to be encoded /// Bytes in XSig format for serial signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int index, int offset, string value) { return new XSigSerialToken(index + offset, value).GetBytes(); @@ -209,6 +245,9 @@ namespace PepperDash.Core.Intersystem /// Starting index of the sequence. /// Serial signal value array. /// Byte sequence in XSig format for serial signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int startIndex, string[] values) { return GetBytes(startIndex, 0, values); @@ -221,6 +260,9 @@ namespace PepperDash.Core.Intersystem /// Index offset. /// Serial signal value array. /// Byte sequence in XSig format for serial signal information. + /// + /// GetBytes method + /// public static byte[] GetBytes(int startIndex, int offset, string[] values) { // Serial XSig data is not fixed-length like the other formats diff --git a/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs b/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs index 9d70d02e..03e79946 100644 --- a/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs +++ b/src/PepperDash.Core/XSigUtility/XSigTokenStreamReader.cs @@ -48,6 +48,9 @@ namespace PepperDash.Core.Intersystem /// Input stream /// Result /// True if successful, otherwise false. + /// + /// TryReadUInt16BE method + /// public static bool TryReadUInt16BE(Stream stream, out ushort value) { value = 0; @@ -65,6 +68,9 @@ namespace PepperDash.Core.Intersystem /// /// XSigToken /// Offset is less than 0. + /// + /// ReadXSigToken method + /// public XSigToken ReadXSigToken() { ushort prefix; @@ -114,6 +120,9 @@ namespace PepperDash.Core.Intersystem /// Reads all available XSig tokens from the stream. /// /// XSigToken collection. + /// + /// ReadAllXSigTokens method + /// public IEnumerable ReadAllXSigTokens() { var tokens = new List(); diff --git a/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs b/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs index 934f2c29..7a4d13e7 100644 --- a/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs +++ b/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs @@ -47,6 +47,9 @@ namespace PepperDash.Core.Intersystem /// Write XSig data gathered from an IXSigStateResolver to the stream. /// /// IXSigStateResolver object. + /// + /// WriteXSigData method + /// public void WriteXSigData(IXSigSerialization xSigSerialization) { WriteXSigData(xSigSerialization, 0); @@ -57,6 +60,9 @@ namespace PepperDash.Core.Intersystem /// /// IXSigStateResolver object. /// Index offset for each XSigToken. + /// + /// WriteXSigData method + /// public void WriteXSigData(IXSigSerialization xSigSerialization, int offset) { if (xSigSerialization == null) @@ -70,6 +76,9 @@ namespace PepperDash.Core.Intersystem /// Write XSigToken to the stream. /// /// XSigToken object. + /// + /// WriteXSigData method + /// public void WriteXSigData(XSigToken token) { WriteXSigData(token, 0); @@ -80,6 +89,9 @@ namespace PepperDash.Core.Intersystem /// /// XSigToken object. /// Index offset for each XSigToken. + /// + /// WriteXSigData method + /// public void WriteXSigData(XSigToken token, int offset) { WriteXSigData(new[] { token }, offset); @@ -108,6 +120,9 @@ namespace PepperDash.Core.Intersystem /// /// XSigToken objects. /// Index offset for each XSigToken. + /// + /// WriteXSigData method + /// public void WriteXSigData(IEnumerable tokens, int offset) { if (offset < 0) @@ -127,6 +142,9 @@ namespace PepperDash.Core.Intersystem /// /// Disposes of the internal stream if specified to not leave open. /// + /// + /// Dispose method + /// public void Dispose() { if (!_leaveOpen) diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index 07bcc56a..96191433 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -12,12 +12,29 @@ using System.Linq; namespace PepperDash.Essentials.Core { + /// + /// Wrapper class for device factory information + /// public class DeviceFactoryWrapper { + /// + /// Gets or sets the device type + /// public Type Type { get; set; } + + /// + /// Gets or sets the description of the device factory + /// public string Description { get; set; } + + /// + /// Gets or sets the factory method for creating devices + /// public Func FactoryMethod { get; set; } + /// + /// Initializes a new instance of the DeviceFactoryWrapper class + /// public DeviceFactoryWrapper() { Type = null; @@ -25,8 +42,14 @@ namespace PepperDash.Essentials.Core } } + /// + /// Factory class for loading and managing device types + /// public class DeviceFactory { + /// + /// Initializes a new instance of the DeviceFactory class and loads all device type factories + /// public DeviceFactory() { var assy = Assembly.GetExecutingAssembly(); From 7987eb8f9b8ebbc313a64ba0ade912f900f7aba2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:53:01 +0000 Subject: [PATCH 06/42] docs: complete XML documentation for all projects with inheritdoc tags Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com> --- .../Comm/CommunicationGather.cs | 4 - .../Comm/CommunicationStreamDebugging.cs | 6 - .../Comm/ControlPropertiesConfig.cs | 3 - src/PepperDash.Core/Comm/EventArgs.cs | 9 - .../Comm/GenericSecureTcpIpClient.cs | 33 - .../GenericSecureTcpIpClient_ForServer.cs | 24 - .../Comm/GenericSecureTcpIpServer.cs | 34 - src/PepperDash.Core/Comm/GenericSshClient.cs | 31 - .../Comm/GenericTcpIpClient.cs | 36 - .../Comm/GenericTcpIpClient_ForServer.cs | 24 - .../Comm/GenericTcpIpServer.cs | 34 - src/PepperDash.Core/Comm/GenericUdpServer.cs | 9 - .../Comm/TcpClientConfigObject.cs | 3 - src/PepperDash.Core/CommunicationExtras.cs | 6 - src/PepperDash.Core/Device.cs | 17 - src/PepperDash.Core/EthernetHelper.cs | 6 - src/PepperDash.Core/EventArgs.cs | 27 - .../EventArgs and Constants.cs | 6 - .../JsonToSimplDeviceConfig.cs | 30 - src/PepperDash.Core/JsonToSimpl/Constants.cs | 6 - src/PepperDash.Core/JsonToSimpl/Global.cs | 3 - .../JsonToSimplArrayLookupChild.cs | 7 +- .../JsonToSimpl/JsonToSimplChildObjectBase.cs | 20 +- .../JsonToSimpl/JsonToSimplFileMaster.cs | 6 - .../JsonToSimpl/JsonToSimplFixedPathObject.cs | 3 - .../JsonToSimpl/JsonToSimplGenericMaster.cs | 10 +- .../JsonToSimpl/JsonToSimplMaster.cs | 13 - .../JsonToSimplPortalFileMaster.cs | 3 - src/PepperDash.Core/Logging/Debug.cs | 15 - src/PepperDash.Core/Logging/DebugContext.cs | 3 - src/PepperDash.Core/Logging/DebugMemory.cs | 3 - .../PasswordManagement/PasswordClient.cs | 6 - .../PasswordManagement/PasswordManager.cs | 3 - .../SystemInfo/EventArgs and Constants.cs | 12 - .../SystemInfo/SystemInfoToSimpl.cs | 9 - .../RequestHandlers/DefaultRequestHandler.cs | 3 - src/PepperDash.Core/Web/WebApiServer.cs | 21 - src/PepperDash.Core/WebApi/Presets/Preset.cs | 27 - src/PepperDash.Core/WebApi/Presets/User.cs | 24 - .../WebApi/Presets/WebApiPasscodeClient.cs | 3 - .../XSigUtility/Tokens/XSigAnalogToken.cs | 1 + .../XSigUtility/Tokens/XSigDigitalToken.cs | 1 + .../XSigUtility/Tokens/XSigSerialToken.cs | 1 + .../XSigUtility/XSigTokenStreamWriter.cs | 3 - .../Bridges/BridgeBase.cs | 76 +- .../Bridges/BridgeHelper.cs | 3 + .../Bridges/IBridge.cs | 2 +- .../JoinMaps/AirMediaControllerJoinMap.cs | 3 + .../Bridges/JoinMaps/AppleTvJoinMap.cs | 3 + .../JoinMaps/C2nRthsControllerJoinMap.cs | 3 + .../JoinMaps/CameraControllerJoinMap.cs | 2 +- .../CenOdtOccupancySensorBaseJoinMap.cs | 3 + .../JoinMaps/DisplayControllerJoinMap.cs | 3 + .../DmBladeChassisControllerJoinMap.cs | 3 + .../JoinMaps/DmChassisControllerJoinMap.cs | 3 + .../JoinMaps/DmRmcControllerJoinMap.cs | 3 + .../Bridges/JoinMaps/DmTxControllerJoinMap.cs | 3 + .../DmpsAudioOutputControllerJoinMap.cs | 3 + .../DmpsMicrophoneControllerJoinMap.cs | 3 + .../JoinMaps/DmpsRoutingControllerJoinMap.cs | 3 + .../JoinMaps/GenericLightingJoinMap.cs | 3 + .../JoinMaps/GenericRelayControllerJoinMap.cs | 3 + .../JoinMaps/GlsOccupancySensorBaseJoinMap.cs | 3 + .../JoinMaps/GlsPartitionSensorJoinMap.cs | 3 + .../JoinMaps/HdMdNxM4kEControllerJoinMap.cs | 3 + .../JoinMaps/HdMdxxxCEControllerJoinMap.cs | 3 + .../JoinMaps/HdPsXxxControllerJoinMap.cs | 3 + .../Hrxxx0WirelessRemoteControllerJoinMap.cs | 3 + .../Bridges/JoinMaps/IAnalogInputJoinMap.cs | 3 + .../JoinMaps/IBasicCommunicationJoinMap.cs | 3 + .../Bridges/JoinMaps/IDigitalInputJoinMap.cs | 3 + .../Bridges/JoinMaps/IDigitalOutputJoinMap.cs | 3 + .../Bridges/JoinMaps/PduJoinMapBase.cs | 3 + .../JoinMaps/SetTopBoxControllerJoinMap.cs | 3 + .../JoinMaps/StatusSignControllerJoinMap.cs | 3 + .../Bridges/JoinMaps/SystemMonitorJoinMap.cs | 3 + .../JoinMaps/VideoCodecControllerJoinMap.cs | 3 + .../Comm and IR/CecPortController.cs | 24 + .../Comm and IR/ComPortController.cs | 28 + .../Comm and IR/ComSpecJsonConverter.cs | 26 +- .../Comm and IR/CommFactory.cs | 29 +- .../Comm and IR/ConsoleCommMockDevice.cs | 44 +- .../Comm and IR/GenericComm.cs | 17 + .../Comm and IR/GenericHttpClient.cs | 30 + .../Comm and IR/IRPortHelper.cs | 19 +- .../Config/AudioControlPointListItem.cs | 3 + .../Config/BasicConfig.cs | 9 + .../Config/ConfigPropertiesHelpers.cs | 5 +- .../Config/DeviceConfig.cs | 31 +- .../Config/Essentials/ConfigReader.cs | 9 + .../Config/Essentials/ConfigUpdater.cs | 12 + .../Config/Essentials/ConfigWriter.cs | 12 + .../Config/Essentials/EssentialsConfig.cs | 12 +- .../Config/ILoadConfig.cs | 3 + .../Config/InfoConfig.cs | 17 +- .../SourceDevicePropertiesConfigBase.cs | 6 + .../Crestron/CrestronGenericBaseDevice.cs | 45 +- .../CrestronIO/GenericDigitalInputDevice.cs | 20 + .../CrestronIO/GenericRelayDevice.cs | 20 + .../GenericVersiportAnalogInputDevice.cs | 17 + .../CrestronIO/GenericVersiportInputDevice.cs | 17 + .../GenericVersiportOutputDevice.cs | 17 + .../CrestronIO/IAnalogInput.cs | 3 + .../CrestronIO/IHasCresnetBranches.cs | 3 + .../CrestronIO/IOPortConfig.cs | 15 + .../Device Info/DeviceInfo.cs | 18 + .../Device Info/DeviceInfoEventArgs.cs | 6 + .../Device Info/IDeviceInfoProvider.cs | 6 + .../Device Info/NetworkDeviceHelpers.cs | 17 +- .../DeviceTypeInterfaces/IChannel.cs | 6 + .../DeviceTypeInterfaces/IColorFunctions.cs | 6 + .../DeviceTypeInterfaces/IDPad.cs | 6 + .../IDiscPlayerControls.cs | 3 + .../DeviceTypeInterfaces/IDisplayBasic.cs | 3 + .../DeviceTypeInterfaces/IDumbSource.cs | 3 + .../DeviceTypeInterfaces/IDvr.cs | 3 + .../DeviceTypeInterfaces/IEmergencyOSD.cs | 3 + .../DeviceTypeInterfaces/IHasBranding.cs | 3 + .../IHasFarEndContentStatus.cs | 3 + .../DeviceTypeInterfaces/IHasPhoneDialing.cs | 3 + .../DeviceTypeInterfaces/IHasWebView.cs | 9 + .../DeviceTypeInterfaces/IHumiditySensor.cs | 3 + .../ILanguageDefinition.cs | 3 + .../DeviceTypeInterfaces/ILanguageProvider.cs | 3 + .../DeviceTypeInterfaces/ILevelControls.cs | 3 + .../DeviceTypeInterfaces/IMobileControl.cs | 11 +- .../DeviceTypeInterfaces/INumeric.cs | 9 +- .../DeviceTypeInterfaces/IPasswordPrompt.cs | 6 +- .../DeviceTypeInterfaces/IPower.cs | 6 + .../IProjectorScreenLiftControl.cs | 9 +- .../DeviceTypeInterfaces/ISelectableItem.cs | 2 +- .../DeviceTypeInterfaces/ISelectableItems.cs | 6 + .../ISetTopBoxControls.cs | 12 +- .../ITemperatureSensor.cs | 3 + .../DeviceTypeInterfaces/ITransport.cs | 9 +- .../ITvPresetsProvider.cs | 3 + .../DeviceTypeInterfaces/IUiDisplayInfo.cs | 6 +- .../DeviceTypeInterfaces/LanguageLabel.cs | 15 + .../Devices/AudioControlListItemBase.cs | 3 + .../Devices/AudioInterfaces.cs | 12 + .../Devices/CameraListItem.cs | 9 + .../Devices/CodecInterfaces.cs | 4 +- .../Devices/DestinationListItem.cs | 3 + .../Devices/DeviceFeedbackExtensions.cs | 3 + .../Devices/DeviceJsonApi.cs | 72 +- .../Devices/DeviceManager.cs | 41 +- .../Devices/EssentialsDevice.cs | 16 +- .../Devices/FIND HOMES Interfaces.cs | 9 +- .../Devices/GenericIRController.cs | 20 + .../Devices/GenericMonitoredTcpDevice.cs | 13 + .../Devices/IAttachVideoStatusExtensions.cs | 6 + .../Devices/IDspPresets.cs | 3 + .../Devices/IHasFeedbacks.cs | 3 + .../Devices/IProjectorInterfaces.cs | 6 + .../Devices/IReconfigurableDevice.cs | 3 + .../Devices/IUsageTracking.cs | 35 +- .../Devices/IVolumeAndAudioInterfaces.cs | 31 +- .../Devices/IrOutputPortController.cs | 26 +- .../Devices/LevelControlListItem.cs | 3 + .../Devices/PowerInterfaces.cs | 6 +- .../Devices/PresentationDeviceType.cs | 3 + .../Devices/PresetListItem.cs | 3 + .../Devices/ReconfigurableDevice.cs | 3 + .../Devices/SmartObjectBaseTypes.cs | 3 + .../Devices/SourceListItem.cs | 5 +- .../Devices/VolumeDeviceChangeEventArgs.cs | 6 +- .../Extensions/JsonExtensions.cs | 3 + .../Extensions/StringExtensions.cs | 18 + .../Factory/DeviceFactory.cs | 10 +- .../Factory/IDeviceFactory.cs | 2 +- .../IProcessorExtensionDeviceFactory.cs | 3 + .../ProcessorExtensionDeviceFactory.cs | 6 + .../Factory/ReadyEventArgs.cs | 9 + .../Feedbacks/BoolFeedback.cs | 21 +- .../Feedbacks/BoolFeedbackOneShot.cs | 21 +- .../Feedbacks/BoolOutputLogicals.cs | 27 +- .../Feedbacks/FeedbackBase.cs | 30 +- .../Feedbacks/FeedbackEventArgs.cs | 18 + .../Feedbacks/IntFeedback.cs | 28 + .../Feedbacks/SerialFeedback.cs | 21 +- .../Feedbacks/StringFeedback.cs | 26 +- src/PepperDash.Essentials.Core/File/FileIO.cs | 30 + ...lsHuddleSpaceFusionSystemControllerBase.cs | 85 +- ...entialsHuddleSpaceRoomFusionRoomJoinMap.cs | 3 + .../Fusion/FusionEventHandlers.cs | 12 + .../Fusion/FusionProcessorQueries.cs | 8 +- .../Fusion/FusionRviDataClasses.cs | 233 +- .../Global/EthernetAdapterInfo.cs | 36 + .../Global/Global.cs | 17 +- .../Global/JobTimer.cs | 12 +- .../Global/Scheduler.cs | 18 + .../InUseTracking/InUseTracking.cs | 22 +- .../Interfaces/ILogStrings.cs | 3 + .../Interfaces/ILogStringsWithLevel.cs | 3 + .../JoinMaps/JoinMapBase.cs | 42 +- .../License/EssentialsLicenseManager.cs | 12 + .../Lighting/Lighting Interfaces.cs | 15 +- .../Lighting/LightingScene.cs | 15 + .../MicrophonePrivacyController.cs | 30 + .../MicrophonePrivacyControllerConfig.cs | 18 + ...CrestronGenericBaseCommunicationMonitor.cs | 8 + .../Monitoring/GenericCommunicationMonitor.cs | 16 +- .../Monitoring/Interfaces.cs | 15 +- .../Monitoring/StatusMonitorBase.cs | 8 +- .../Monitoring/StatusMonitorCollection.cs | 18 + .../Monitoring/SystemMonitorController.cs | 180 +- .../EssentialsPartitionController.cs | 27 + .../IPartitionStateProvider.cs | 4 +- .../Plugins/PluginLoader.cs | 21 +- .../Presets/DevicePresets.cs | 48 + .../Presets/DevicePresetsView.cs | 24 + .../Presets/PresetBase.cs | 15 + .../Presets/PresetChannel.cs | 21 + .../PresetsListSubpageReferenceListItem.cs | 11 + .../Queues/ComsMessage.cs | 7 +- .../Queues/GenericQueue.cs | 8 +- .../Queues/IQueue.cs | 3 + .../Queues/IQueueMessage.cs | 3 + .../Queues/ProcessStringMessage.cs | 6 +- .../Queues/StringResponseProcessor.cs | 2 +- .../Ramps and Increments/ActionIncrementer.cs | 2 +- .../Ramps and Increments/NumericalHelpers.cs | 3 + .../UshortSigIncrementer.cs | 9 + .../RoomOnToDefaultSourceWhenOccupied.cs | 53 + .../Room/Combining/EssentialsRoomCombiner.cs | 143 +- .../Room/Combining/IEssentialsRoomCombiner.cs | 23 +- .../Room/Combining/RoomCombinationScenario.cs | 6 + ...sentialsDualDisplayRoomPropertiesConfig.cs | 3 + .../EssentialsHuddleRoomPropertiesConfig.cs | 2 +- .../EssentialsHuddleVtc1PropertiesConfig.cs | 6 + .../EssentialsNDisplayRoomPropertiesConfig.cs | 9 + .../EssentialsPresentationPropertiesConfig.cs | 8 +- .../Room/Config/EssentialsRoomConfig.cs | 166 +- .../Config/EssentialsRoomEmergencyConfig.cs | 10 +- .../EssentialsRoomScheduledEventsConfig.cs | 30 + .../Room/Config/EssentialsTechRoomConfig.cs | 18 + .../Config/EssentialsVolumeLevelConfig.cs | 16 +- .../Room/Config/SimplRoomPropertiesConfig.cs | 24 + .../EsentialsRoomEmergencyContactClosure.cs | 10 +- .../Room/EssentialsRoomBase.cs | 31 +- .../Room/IRoomEventSchedule.cs | 9 + .../Room/Interfaces.cs | 26 +- src/PepperDash.Essentials.Core/Room/Room.cs | 21 + .../Room/iOccupancyStatusProvider.cs | 3 + .../Routing/DummyRoutingInputsDevice.cs | 9 +- .../Routing/Extensions.cs | 9 + .../Routing/IHasCurrentSourceInfoChange.cs | 2 +- .../Routing/IInputSync.cs | 3 + .../Routing/IMatrixRouting.cs | 3 + .../Routing/IRmcRouting.cs | 2 +- .../Routing/IRmcRoutingWithFeedback.cs | 2 +- .../Routing/IRoutingFeedback.cs | 2 +- .../IRoutingHasVideoInputSyncFeedbacks.cs | 3 + .../Routing/IRoutingInputSlot.cs | 3 + .../Routing/IRoutingInputs.cs | 2 +- .../Routing/IRoutingInputsOutputs.cs | 2 +- .../Routing/IRoutingNumeric.cs | 3 + .../Routing/IRoutingNumericWithFeedback.cs | 2 +- .../Routing/IRoutingOutputSlot.cs | 3 + .../Routing/IRoutingOutputs.cs | 6 +- .../Routing/IRoutingSink.cs | 2 +- .../Routing/IRoutingSinkWithFeedback.cs | 2 +- .../Routing/IRoutingSinkWithSwitching.cs | 11 +- .../Routing/IRoutingSlot.cs | 3 + .../Routing/IRoutingSource.cs | 2 +- .../Routing/IRoutingWithClear.cs | 2 +- .../Routing/IRoutingWithFeedback.cs | 3 + .../Routing/ITxRouting.cs | 3 +- .../Routing/ITxRoutingWithFeedback.cs | 2 +- .../Routing/RouteDescriptor.cs | 38 +- .../Routing/RouteDescriptorCollection.cs | 18 +- .../Routing/RouteRequest.cs | 13 +- .../Routing/RouteRequestQueueItem.cs | 6 +- .../Routing/RouteSwitchDescriptor.cs | 28 +- .../Routing/RoutingInputPort.cs | 8 +- .../RoutingInputPortWithVideoStatuses.cs | 3 +- .../Routing/RoutingNumericEventArgs.cs | 2 +- .../Routing/RoutingOutputPort.cs | 15 +- .../Routing/RoutingPort.cs | 18 + .../Routing/RoutingPortCollection.cs | 9 +- .../Routing/TieLine.cs | 4 +- .../Routing/TieLineConfig.cs | 30 +- .../Routing/eRoutingPortConnectionType.cs | 3 + .../Routing/eRoutingSignalType.cs | 3 + .../Secrets/CrestronGlobalSecretsProvider.cs | 15 + .../Secrets/CrestronLocalSecretsProvider.cs | 15 + .../Secrets/Interfaces.cs | 2 +- .../Secrets/SecretsManager.cs | 17 +- .../Shades/Shade Interfaces.cs | 14 +- src/PepperDash.Essentials.Core/SigHelper.cs | 12 +- .../SmartObjects/SmartObjectDPad.cs | 18 + .../SmartObjects/SmartObjectDynamicList.cs | 40 +- .../SmartObjects/SmartObjectHelperBase.cs | 18 +- .../SmartObjects/SmartObjectNumeric.cs | 22 +- .../SubpageReferenceList.cs | 33 +- .../SubpageReferenceListItem.cs | 13 +- .../Timers/CountdownTimer.cs | 37 +- .../Timers/RetriggerableTimer.cs | 12 +- .../CrestronTouchpanelPropertiesConfig.cs | 29 +- .../Touchpanels/Interfaces.cs | 3 + .../Keyboards/HabaneroKeyboardController.cs | 42 +- .../Touchpanels/ModalDialog.cs | 11 +- .../Touchpanels/Mpc3Touchpanel.cs | 27 +- .../Touchpanels/TriListExtensions.cs | 49 +- .../TriListBridges/HandlerBridge.cs | 3 + .../UI PageManagers/BlurayPageManager.cs | 11 + .../UI PageManagers/PageManager.cs | 10 + .../SetTopBoxThreePanelPageManager.cs | 30 + .../SetTopBoxTwoPanelPageManager.cs | 15 +- .../UI PageManagers/SinglePageManager.cs | 13 +- .../UI/TouchpanelBase.cs | 3 + .../Utilities/ActionSequence.cs | 14 +- .../VideoStatus/VideoStatusOutputs.cs | 24 +- .../Web/EssentialsWebApi.cs | 18 +- .../Web/EssentialsWebApiFactory.cs | 7 + .../Web/EssentialsWebApiHelpers.cs | 24 + .../Web/EssentialsWebApiPropertiesConfig.cs | 6 + .../RequestHandlers/AppDebugRequestHandler.cs | 9 + .../DebugSessionRequestHandler.cs | 3 + .../RequestHandlers/DefaultRequestHandler.cs | 3 + .../RequestHandlers/DevJsonRequestHandler.cs | 3 + .../RequestHandlers/DevListRequestHandler.cs | 3 + .../DevMethodsRequestHandler.cs | 3 + .../RequestHandlers/DevPropsRequestHandler.cs | 3 + .../DisableAllStreamDebugRequestHandler.cs | 3 + ...DoNotLoadConfigOnNextBootRequestHandler.cs | 9 + .../GetFeedbacksForDeviceRequestHandler.cs | 3 + .../GetJoinMapForBridgeKeyRequestHandler.cs | 3 + .../GetJoinMapForDeviceKeyRequestHandler.cs | 3 + .../Web/RequestHandlers/GetRoutesHandler.cs | 12 + .../RequestHandlers/GetRoutingPortsHandler.cs | 9 + .../GetTieLinesRequestHandler.cs | 3 + .../GetTypesByFilterRequestHandler.cs | 3 + .../RequestHandlers/GetTypesRequestHandler.cs | 3 + .../LoadConfigRequestHandler.cs | 3 + .../ReportVersionsRequestHandler.cs | 3 + .../RestartProgramRequestHandler.cs | 3 + .../SetDeviceStreamDebugRequestHandler.cs | 12 + .../ShowConfigRequestHandler.cs | 3 + .../Audio/GenericAudioOut.cs | 15 +- .../AudioCodec/AudioCodecBase.cs | 9 +- .../AudioCodec/MockAC/MockAC.cs | 39 + .../MockAC/MockAcPropertiesConfig.cs | 6 + .../Cameras/CameraBase.cs | 30 + .../Cameras/CameraControl.cs | 30 +- .../Cameras/CameraVisca.cs | 113 + .../Codec/CodecActiveCallItem.cs | 32 +- .../Codec/IHasCallHold.cs | 3 + .../Codec/IHasExternalSourceSwitching.cs | 3 + .../Codec/eCodecCallDirection.cs | 9 + .../Codec/eCodecCallStatus.cs | 9 + .../Codec/eCodecCallType.cs | 9 + .../Codec/eMeetingPrivacy.cs | 9 + .../Codec/iHasCallFavorites.cs | 8 +- .../Codec/iHasCallHistory.cs | 25 +- .../Codec/iHasContentSharing.cs | 3 + .../Codec/iHasDirectory.cs | 89 +- .../Codec/iHasScheduleAwareness.cs | 69 +- .../DSP/DspBase.cs | 9 + .../DeviceFactory.cs | 3 + .../Displays/BasicIrDisplay.cs | 63 + .../Displays/DisplayBase.cs | 31 +- .../Displays/InputInterfaces.cs | 21 + .../Displays/MockDisplay.cs | 59 + .../Displays/MockDisplayInputs.cs | 15 + .../Displays/ScreenLiftController.cs | 53 + .../Generic/GenericSink.cs | 19 + .../Generic/GenericSource.cs | 22 + .../Lighting/LightingBase.cs | 12 + .../Room/IEssentialsHuddleSpaceRoom.cs | 3 + .../Room/IEssentialsHuddleVtc1Room.cs | 3 + .../Room/IEssentialsRoomPropertiesConfig.cs | 3 + .../Room/IEssentialsTechRoom.cs | 3 + .../SetTopBox/IRSetTopBoxBase.cs | 185 +- .../SetTopBox/SetTopBoxPropertiesConfig.cs | 21 + .../Shades/RelayControlledShade.cs | 50 + .../Shades/ShadeController.cs | 23 + .../SoftCodec/BlueJeansPc.cs | 25 + .../SoftCodec/GenericSoftCodec.cs | 40 + .../Sources/InRoomPc.cs | 31 +- .../Sources/Laptop.cs | 31 +- .../Streaming/AppleTV.cs | 55 + .../Streaming/Roku.cs | 52 + .../CiscoCodec/CallHistoryDataClasses.cs | 126 + .../VideoCodec/CiscoCodec/RoomPresets.cs | 2 +- .../CiscoCodec/eExternalSourceMode.cs | 3 + .../CiscoCodec/eExternalSourceType.cs | 3 + .../VideoCodec/Interfaces/IHasMeetingInfo.cs | 33 +- .../VideoCodec/Interfaces/IHasMeetingLock.cs | 3 + .../Interfaces/IHasMeetingRecording.cs | 6 + .../VideoCodec/Interfaces/IHasParticipants.cs | 39 +- .../Interfaces/IHasPresentationOnlyMeeting.cs | 6 + .../Interfaces/IHasSelfviewPosition.cs | 3 + .../VideoCodec/Interfaces/IHasSelfviewSize.cs | 3 + .../VideoCodec/Interfaces/IHasStandbyMode.cs | 2 +- .../VideoCodec/Interfaces/IJoinCalls.cs | 3 + .../VideoCodec/MockVC/MockCodecDirectory.cs | 3 + .../VideoCodec/MockVC/MockVC.cs | 162 +- .../VideoCodec/MockVC/MockVCCamera.cs | 84 + .../MockVC/MockVcPropertiesConfig.cs | 9 + .../VideoCodec/VideoCodecBase.cs | 120 +- .../ContentTypes.cs | 24 + .../DisplayBaseMessenger.cs | 3 + .../DeviceTypeExtensions/IChannelMessenger.cs | 3 + .../DeviceTypeExtensions/IColorMessenger.cs | 3 + .../DeviceTypeExtensions/IDPadMessenger.cs | 3 + .../DeviceTypeExtensions/IDvrMessenger.cs | 3 + .../IHasPowerMessenger.cs | 3 + .../DeviceTypeExtensions/INumericMessenger.cs | 3 + .../ISetTopBoxControlsMessenger.cs | 3 + .../ITransportMessenger.cs | 3 + .../Messengers/CameraBaseMessenger.cs | 5 +- .../Messengers/DeviceInfoMessenger.cs | 69 +- .../Messengers/DevicePresetsModelMessenger.cs | 18 + .../Messengers/DeviceVolumeMessenger.cs | 18 + .../Messengers/GenericMessenger.cs | 3 + .../ICommunicationMonitorMessenger.cs | 8 +- .../Messengers/IDspPresetsMessenger.cs | 6 + .../IEssentialsRoomCombinerMessenger.cs | 66 +- .../IHasCurrentSourceInfoMessenger.cs | 12 + .../Messengers/IHasInputsMessenger.cs | 15 + .../IHasPowerControlWithFeedbackMessenger.cs | 9 + .../IHasScheduleAwarenessMessenger.cs | 30 + .../Messengers/IHumiditySensor.cs | 9 + .../Messengers/ILevelControlsMessenger.cs | 12 + .../Messengers/IMatrixRoutingMessenger.cs | 21 + .../IProjectorScreenLiftControlMessenger.cs | 12 + .../Messengers/IRunRouteActionMessenger.cs | 11 +- .../Messengers/ISelectableItemsMessenger.cs | 9 + .../IShutdownPromptTimerMessenger.cs | 15 + .../Messengers/ISwitchedOutputMessenger.cs | 9 + .../Messengers/ITechPasswordMessenger.cs | 15 + .../Messengers/ITemperatureSensorMessenger.cs | 12 + .../Messengers/LightingBaseMessenger.cs | 12 + .../Messengers/MessengerBase.cs | 20 +- .../Messengers/PressAndHoldHandler.cs | 3 + .../Messengers/RoomEventScheduleMessenger.cs | 9 + .../Messengers/SIMPLAtcMessenger.cs | 6 + .../Messengers/SIMPLCameraMessenger.cs | 6 + .../Messengers/SIMPLDirectRouteMessenger.cs | 9 + .../Messengers/SIMPLRouteMessenger.cs | 9 + .../Messengers/SIMPLVtcMessenger.cs | 6 + .../Messengers/ShadeBaseMessenger.cs | 9 + .../SimplMessengerPropertiesConfig.cs | 2 +- .../Messengers/SystemMonitorMessenger.cs | 24 + .../Messengers/TwoWayDisplayBaseMessenger.cs | 12 + .../Messengers/VideoCodecBaseMessenger.cs | 71 +- .../MobileControlMessage.cs | 12 + .../MobileControlSimpleContent.cs | 6 + .../MobileControlSIMPLRoomJoinMap.cs | 3 + ...ControlSIMPLRunDirectRouteActionJoinMap.cs | 3 + .../SIMPLJoinMaps/SIMPLAtcJoinMap.cs | 3 + .../SIMPLJoinMaps/SIMPLVtcJoinMap.cs | 3 + .../AuthorizationResponse.cs | 15 + .../Interfaces.cs | 4 +- .../MobileControlAction.cs | 6 + .../MobileControlConfig.cs | 84 +- .../MobileControlDeviceFactory.cs | 7 + .../MobileControlEssentialsConfig.cs | 10 +- .../MobileControlFactory.cs | 3 + .../MobileControlSimplDeviceBridge.cs | 56 +- .../MobileControlSystemController.cs | 69 +- .../RoomBridges/MobileControlBridgeBase.cs | 24 + .../MobileControlEssentialsRoomBridge.cs | 123 +- .../MobileControlSIMPLRoomBridge.cs | 16 +- .../RoomBridges/SourceDeviceMapDictionary.cs | 2 +- .../Services/MobileControlApiService.cs | 3 + .../Touchpanel/ITheme.cs | 3 + .../Touchpanel/ITswAppControl.cs | 6 + .../Touchpanel/ITswAppControlMessenger.cs | 6 + .../Touchpanel/ITswZoomControlMessenger.cs | 6 + .../MobileControlTouchpanelController.cs | 34 +- .../MobileControlTouchpanelProperties.cs | 15 + .../Touchpanel/ThemeMessenger.cs | 9 + .../TransmitMessage.cs | 12 + .../UserCodeChangedContent.cs | 9 + .../Volumes.cs | 18 + .../WebApiHandlers/ActionPathsHandler.cs | 15 + .../MobileAuthRequestHandler.cs | 3 + .../WebApiHandlers/MobileInfoHandler.cs | 15 + .../WebApiHandlers/UiClientHandler.cs | 27 + .../MobileControlWebsocketServer.cs | 2641 +++++++++-------- .../WebSocketServerSecretProvider.cs | 15 + src/PepperDash.Essentials/ControlSystem.cs | 21 +- src/PepperDash.Essentials/HttpLogoServer.cs | 3 + 485 files changed, 8099 insertions(+), 2490 deletions(-) diff --git a/src/PepperDash.Core/Comm/CommunicationGather.cs b/src/PepperDash.Core/Comm/CommunicationGather.cs index 3a03f929..e75a012d 100644 --- a/src/PepperDash.Core/Comm/CommunicationGather.cs +++ b/src/PepperDash.Core/Comm/CommunicationGather.cs @@ -84,10 +84,6 @@ 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 /// diff --git a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs index 59d00d29..33141f0c 100644 --- a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs +++ b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs @@ -22,9 +22,6 @@ namespace PepperDash.Core /// private CTimer DebugExpiryPeriod; - /// - /// The current debug setting - /// /// /// Gets or sets the DebugSetting /// @@ -44,9 +41,6 @@ namespace PepperDash.Core } } - /// - /// Indicates that receive stream debugging is enabled - /// /// /// Gets or sets the RxStreamDebuggingIsEnabled /// diff --git a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs index 443e3c40..c665dad8 100644 --- a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs +++ b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs @@ -5,9 +5,6 @@ using Newtonsoft.Json.Converters; namespace PepperDash.Core { - /// - /// Config properties that indicate how to communicate with a device for control - /// /// /// Represents a ControlPropertiesConfig /// diff --git a/src/PepperDash.Core/Comm/EventArgs.cs b/src/PepperDash.Core/Comm/EventArgs.cs index 09904f21..0b394423 100644 --- a/src/PepperDash.Core/Comm/EventArgs.cs +++ b/src/PepperDash.Core/Comm/EventArgs.cs @@ -29,9 +29,6 @@ namespace PepperDash.Core /// public class GenericSocketStatusChageEventArgs : EventArgs { - /// - /// - /// /// /// Gets or sets the Client /// @@ -62,9 +59,6 @@ namespace PepperDash.Core /// public class GenericTcpServerStateChangedEventArgs : EventArgs { - /// - /// - /// /// /// Gets or sets the State /// @@ -159,9 +153,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// Gets or sets the Text /// diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs index 78c3cb0d..204c548b 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs @@ -78,9 +78,6 @@ namespace PepperDash.Core } } - /// - /// Port on server - /// /// /// Gets or sets the Port /// @@ -151,9 +148,6 @@ 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 /// @@ -193,9 +187,6 @@ 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 /// @@ -215,9 +206,6 @@ 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 /// @@ -233,9 +221,6 @@ namespace PepperDash.Core /// bool IsTryingToConnect; - /// - /// Bool showing if socket is ready for communication after shared key exchange - /// /// /// Gets or sets the IsReadyForCommunication /// @@ -356,9 +341,6 @@ namespace PepperDash.Core BufferSize = 2000; } - /// - /// Just to help S+ set the key - /// /// /// Initialize method /// @@ -452,9 +434,6 @@ namespace PepperDash.Core return true; } - /// - /// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name. - /// /// /// Connect method /// @@ -586,9 +565,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// Disconnect method /// @@ -612,9 +588,6 @@ namespace PepperDash.Core } } - /// - /// Does the actual disconnect business - /// /// /// DisconnectClient method /// @@ -875,9 +848,6 @@ namespace PepperDash.Core } } - /// - /// General send method - /// /// /// SendText method /// @@ -907,9 +877,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// SendBytes method /// diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs index d2deaecc..49350164 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpClient_ForServer.cs @@ -79,9 +79,6 @@ namespace PepperDash.Core /// public string Hostname { get; set; } - /// - /// Port on server - /// /// /// Gets or sets the Port /// @@ -115,9 +112,6 @@ 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 /// @@ -128,9 +122,6 @@ namespace PepperDash.Core /// private bool WaitingForSharedKeyResponse { get; set; } - /// - /// Defaults to 2000 - /// /// /// Gets or sets the BufferSize /// @@ -344,9 +335,6 @@ namespace PepperDash.Core #region Methods - /// - /// Just to help S+ set the key - /// /// /// Initialize method /// @@ -406,9 +394,6 @@ namespace PepperDash.Core } - /// - /// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name. - /// /// /// Connect method /// @@ -540,9 +525,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// Disconnect method /// @@ -821,9 +803,6 @@ namespace PepperDash.Core } } - /// - /// General send method - /// /// /// SendText method /// @@ -853,9 +832,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// SendBytes method /// diff --git a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs index db3ea304..6502d544 100644 --- a/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs +++ b/src/PepperDash.Core/Comm/GenericSecureTcpIpServer.cs @@ -57,9 +57,6 @@ namespace PepperDash.Core /// public ServerHasChokedCallbackDelegate ServerHasChoked { get; set; } - /// - /// - /// /// /// Delegate for ServerHasChokedCallbackDelegate /// @@ -106,9 +103,6 @@ namespace PepperDash.Core /// int MonitorClientFailureCount; - /// - /// 3 by default - /// /// /// Gets or sets the MonitorClientMaxFailureCount /// @@ -195,9 +189,6 @@ namespace PepperDash.Core } } - /// - /// Port Server should listen on - /// /// /// Gets or sets the Port /// @@ -231,10 +222,6 @@ 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 /// @@ -259,9 +246,6 @@ namespace PepperDash.Core } } - /// - /// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+ - /// /// /// Gets or sets the HeartbeatRequiredIntervalMs /// @@ -272,9 +256,6 @@ 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 /// @@ -293,9 +274,6 @@ namespace PepperDash.Core /// public List ConnectedClientsIndexes = new List(); - /// - /// Defaults to 2000 - /// /// /// Gets or sets the BufferSize /// @@ -360,9 +338,6 @@ namespace PepperDash.Core #region Methods - Server Actions /// - /// Disconnects all clients and stops the server - /// - /// /// KillServer method /// public void KillServer() @@ -421,9 +396,6 @@ namespace PepperDash.Core } } - /// - /// Start listening on the specified port - /// /// /// Listen method /// @@ -482,9 +454,6 @@ namespace PepperDash.Core } } - /// - /// Stop Listeneing - /// /// /// StopListening method /// @@ -527,9 +496,6 @@ namespace PepperDash.Core } } /// - /// Disconnect All Clients - /// - /// /// DisconnectAllClientsForShutdown method /// public void DisconnectAllClientsForShutdown() diff --git a/src/PepperDash.Core/Comm/GenericSshClient.cs b/src/PepperDash.Core/Comm/GenericSshClient.cs index 52b88bea..2817ccd4 100644 --- a/src/PepperDash.Core/Comm/GenericSshClient.cs +++ b/src/PepperDash.Core/Comm/GenericSshClient.cs @@ -41,9 +41,6 @@ namespace PepperDash.Core ///// //public event GenericSocketStatusChangeEventDelegate SocketStatusChange; - /// - /// Address of server - /// /// /// Gets or sets the Hostname /// @@ -54,17 +51,11 @@ 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 /// @@ -131,10 +122,6 @@ namespace PepperDash.Core set { AutoReconnect = value == 1; } } - /// - /// Millisecond value, determines the timeout period in between reconnect attempts. - /// Set to 5000 by default - /// /// /// Gets or sets the AutoReconnectIntervalMs /// @@ -209,9 +196,6 @@ namespace PepperDash.Core } } - /// - /// Connect to the server, using the provided properties. - /// /// /// Connect method /// @@ -339,9 +323,6 @@ namespace PepperDash.Core } } - /// - /// Disconnect the clients and put away it's resources. - /// /// /// Disconnect method /// @@ -573,9 +554,6 @@ namespace PepperDash.Core //***************************************************************************************************** //***************************************************************************************************** /// -/// Fired when connection changes -/// -/// /// Represents a SshConnectionChangeEventArgs /// public class SshConnectionChangeEventArgs : EventArgs @@ -585,25 +563,16 @@ 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 /// diff --git a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs index ef4737be..c9235411 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpClient.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpClient.cs @@ -58,9 +58,6 @@ namespace PepperDash.Core } } - /// - /// Port on server - /// /// /// Gets or sets the Port /// @@ -138,9 +135,6 @@ 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 /// @@ -237,9 +231,6 @@ namespace PepperDash.Core }, Timeout.Infinite); } - /// - /// Just to help S+ set the key - /// /// /// Initialize method /// @@ -279,9 +270,6 @@ namespace PepperDash.Core return true; } - /// - /// Attempts to connect to the server - /// /// /// Connect method /// @@ -349,9 +337,6 @@ namespace PepperDash.Core } } - /// - /// Attempts to disconnect the client - /// /// /// Disconnect method /// @@ -372,9 +357,6 @@ namespace PepperDash.Core } } - /// - /// Does the actual disconnect business - /// /// /// DisconnectClient method /// @@ -467,9 +449,6 @@ namespace PepperDash.Core } } - /// - /// General send method - /// /// /// SendText method /// @@ -483,9 +462,6 @@ namespace PepperDash.Core _client.SendData(bytes, bytes.Length); } - /// - /// This is useful from console and...? - /// /// /// SendEscapedText method /// @@ -538,9 +514,6 @@ namespace PepperDash.Core } } - /// - /// Configuration properties for TCP/SSH Connections - /// /// /// Represents a TcpSshPropertiesConfig /// @@ -562,9 +535,6 @@ namespace PepperDash.Core /// Username credential /// public string Username { get; set; } - /// - /// Passord credential - /// /// /// Gets or sets the Password /// @@ -575,17 +545,11 @@ 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 /// diff --git a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs index 437d99eb..6d4958ca 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpClient_ForServer.cs @@ -68,9 +68,6 @@ namespace PepperDash.Core /// public string Hostname { get; set; } - /// - /// Port on server - /// /// /// Gets or sets the Port /// @@ -104,9 +101,6 @@ 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 /// @@ -117,9 +111,6 @@ namespace PepperDash.Core /// private bool WaitingForSharedKeyResponse { get; set; } - /// - /// Defaults to 2000 - /// /// /// Gets or sets the BufferSize /// @@ -297,9 +288,6 @@ namespace PepperDash.Core #region Methods - /// - /// Just to help S+ set the key - /// /// /// Initialize method /// @@ -322,9 +310,6 @@ namespace PepperDash.Core } - /// - /// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name. - /// /// /// Connect method /// @@ -456,9 +441,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// Disconnect method /// @@ -686,9 +668,6 @@ namespace PepperDash.Core } } - /// - /// General send method - /// /// /// SendText method /// @@ -718,9 +697,6 @@ namespace PepperDash.Core } } - /// - /// - /// /// /// SendBytes method /// diff --git a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs index e05064b7..5cec96df 100644 --- a/src/PepperDash.Core/Comm/GenericTcpIpServer.cs +++ b/src/PepperDash.Core/Comm/GenericTcpIpServer.cs @@ -51,9 +51,6 @@ namespace PepperDash.Core /// public ServerHasChokedCallbackDelegate ServerHasChoked { get; set; } - /// - /// - /// /// /// Delegate for ServerHasChokedCallbackDelegate /// @@ -84,9 +81,6 @@ namespace PepperDash.Core /// int MonitorClientFailureCount; - /// - /// 3 by default - /// /// /// Gets or sets the MonitorClientMaxFailureCount /// @@ -176,9 +170,6 @@ namespace PepperDash.Core } } - /// - /// Port Server should listen on - /// /// /// Gets or sets the Port /// @@ -212,10 +203,6 @@ 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 /// @@ -240,9 +227,6 @@ namespace PepperDash.Core } } - /// - /// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+ - /// /// /// Gets or sets the HeartbeatRequiredIntervalMs /// @@ -253,9 +237,6 @@ 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 /// @@ -274,9 +255,6 @@ namespace PepperDash.Core /// public List ConnectedClientsIndexes = new List(); - /// - /// Defaults to 2000 - /// /// /// Gets or sets the BufferSize /// @@ -341,9 +319,6 @@ namespace PepperDash.Core #region Methods - Server Actions /// - /// Disconnects all clients and stops the server - /// - /// /// KillServer method /// public void KillServer() @@ -401,9 +376,6 @@ namespace PepperDash.Core } } - /// - /// Start listening on the specified port - /// /// /// Listen method /// @@ -461,9 +433,6 @@ namespace PepperDash.Core } } - /// - /// Stop Listening - /// /// /// StopListening method /// @@ -506,9 +475,6 @@ namespace PepperDash.Core } } /// - /// Disconnect All Clients - /// - /// /// DisconnectAllClientsForShutdown method /// public void DisconnectAllClientsForShutdown() diff --git a/src/PepperDash.Core/Comm/GenericUdpServer.cs b/src/PepperDash.Core/Comm/GenericUdpServer.cs index 15f80443..61bebf8d 100644 --- a/src/PepperDash.Core/Comm/GenericUdpServer.cs +++ b/src/PepperDash.Core/Comm/GenericUdpServer.cs @@ -187,9 +187,6 @@ namespace PepperDash.Core Disconnect(); } - /// - /// Enables the UDP Server - /// /// /// Connect method /// @@ -227,9 +224,6 @@ namespace PepperDash.Core Server.ReceiveDataAsync(Receive); } - /// - /// Disabled the UDP Server - /// /// /// Disconnect method /// @@ -335,9 +329,6 @@ namespace PepperDash.Core } - /// - /// - /// /// /// Represents a GenericUdpReceiveTextExtraArgs /// diff --git a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs index 86c891d1..226473bf 100644 --- a/src/PepperDash.Core/Comm/TcpClientConfigObject.cs +++ b/src/PepperDash.Core/Comm/TcpClientConfigObject.cs @@ -2,9 +2,6 @@ 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 /// diff --git a/src/PepperDash.Core/CommunicationExtras.cs b/src/PepperDash.Core/CommunicationExtras.cs index a3ccb811..d16ea761 100644 --- a/src/PepperDash.Core/CommunicationExtras.cs +++ b/src/PepperDash.Core/CommunicationExtras.cs @@ -38,9 +38,6 @@ namespace PepperDash.Core void Disconnect(); } - /// - /// Represents a device that uses basic connection - /// /// /// Defines the contract for IBasicCommunication /// @@ -150,9 +147,6 @@ namespace PepperDash.Core /// public class GenericCommMethodReceiveBytesArgs : EventArgs { - /// - /// - /// /// /// Gets or sets the Bytes /// diff --git a/src/PepperDash.Core/Device.cs b/src/PepperDash.Core/Device.cs index a33ab594..27548b0a 100644 --- a/src/PepperDash.Core/Device.cs +++ b/src/PepperDash.Core/Device.cs @@ -5,9 +5,6 @@ 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 /// @@ -18,9 +15,6 @@ namespace PepperDash.Core /// Unique Key /// public string Key { get; protected set; } - /// - /// Name of the devie - /// /// /// Gets or sets the Name /// @@ -102,9 +96,6 @@ namespace PepperDash.Core _PostActivationActions.Add(act); } - /// - /// Executes the preactivation actions - /// /// /// PreActivate method /// @@ -124,11 +115,6 @@ 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 /// @@ -142,9 +128,6 @@ namespace PepperDash.Core return result; } - /// - /// Executes the postactivation actions - /// /// /// PostActivate method /// diff --git a/src/PepperDash.Core/EthernetHelper.cs b/src/PepperDash.Core/EthernetHelper.cs index 120a7505..76a9405c 100644 --- a/src/PepperDash.Core/EthernetHelper.cs +++ b/src/PepperDash.Core/EthernetHelper.cs @@ -4,9 +4,6 @@ using Serilog.Events; namespace PepperDash.Core { - /// - /// Class to help with accessing values from the CrestronEthernetHelper class - /// /// /// Represents a EthernetHelper /// @@ -27,9 +24,6 @@ namespace PepperDash.Core // ADD OTHER HELPERS HERE - /// - /// - /// /// /// Gets or sets the PortNumber /// diff --git a/src/PepperDash.Core/EventArgs.cs b/src/PepperDash.Core/EventArgs.cs index dace1314..c146a6f2 100644 --- a/src/PepperDash.Core/EventArgs.cs +++ b/src/PepperDash.Core/EventArgs.cs @@ -16,25 +16,16 @@ 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 /// @@ -73,9 +64,6 @@ namespace PepperDash.Core } } - /// - /// Ushort change event args - /// /// /// Represents a UshrtChangeEventArgs /// @@ -86,17 +74,11 @@ 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 /// @@ -135,9 +117,6 @@ namespace PepperDash.Core } } - /// - /// String change event args - /// /// /// Represents a StringChangeEventArgs /// @@ -148,17 +127,11 @@ 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 /// diff --git a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs index e460e75d..110587ab 100644 --- a/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs +++ b/src/PepperDash.Core/JsonStandardObjects/EventArgs and Constants.cs @@ -32,17 +32,11 @@ 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 /// diff --git a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs index 83e2df6c..d754a029 100644 --- a/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs +++ b/src/PepperDash.Core/JsonStandardObjects/JsonToSimplDeviceConfig.cs @@ -47,17 +47,11 @@ namespace PepperDash.Core.JsonStandardObjects ] } */ - /// - /// Device communication parameter class - /// /// /// Represents a ComParamsConfig /// public class ComParamsConfig { - /// - /// - /// /// /// Gets or sets the baudRate /// @@ -92,16 +86,10 @@ 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 /// @@ -155,16 +143,10 @@ 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 /// @@ -210,9 +192,6 @@ namespace PepperDash.Core.JsonStandardObjects public TcpSshPropertiesConfig tcpSshProperties { get; set; } // convert properties for simpl - /// - /// - /// /// /// Gets or sets the simplControlPortNumber /// @@ -228,9 +207,6 @@ namespace PepperDash.Core.JsonStandardObjects } } - /// - /// Device properties class - /// /// /// Represents a PropertiesConfig /// @@ -250,16 +226,10 @@ 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 /// diff --git a/src/PepperDash.Core/JsonToSimpl/Constants.cs b/src/PepperDash.Core/JsonToSimpl/Constants.cs index 5cdf9cb2..ca638bbf 100644 --- a/src/PepperDash.Core/JsonToSimpl/Constants.cs +++ b/src/PepperDash.Core/JsonToSimpl/Constants.cs @@ -88,9 +88,6 @@ namespace PepperDash.Core.JsonToSimpl /// public class SPlusValueWrapper { - /// - /// - /// /// /// Gets or sets the ValueType /// @@ -125,9 +122,6 @@ namespace PepperDash.Core.JsonToSimpl } } - /// - /// S+ types enum - /// /// /// Enumeration of SPlusType values /// diff --git a/src/PepperDash.Core/JsonToSimpl/Global.cs b/src/PepperDash.Core/JsonToSimpl/Global.cs index 6833096b..8d71c5fb 100644 --- a/src/PepperDash.Core/JsonToSimpl/Global.cs +++ b/src/PepperDash.Core/JsonToSimpl/Global.cs @@ -52,9 +52,6 @@ namespace PepperDash.Core.JsonToSimpl } } - /// - /// Gets a master by its key. Case-insensitive - /// /// /// GetMasterByFile method /// diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs index 00c6999f..268f6207 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs @@ -5,9 +5,6 @@ using Serilog.Events; namespace PepperDash.Core.JsonToSimpl { - /// - /// Used to interact with an array of values with the S+ modules - /// /// /// Represents a JsonToSimplArrayLookupChild /// @@ -79,12 +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 e13e117f..68e4bf91 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplChildObjectBase.cs @@ -28,17 +28,11 @@ 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 /// @@ -55,9 +49,6 @@ namespace PepperDash.Core.JsonToSimpl /// public string PathSuffix { get; protected set; } - /// - /// Indicates if the instance is linked to an object - /// /// /// Gets or sets the LinkedToObject /// @@ -122,9 +113,6 @@ namespace PepperDash.Core.JsonToSimpl BoolPaths[index] = path; } - /// - /// Set the JPath for a ushort out index. - /// /// /// SetUshortPath method /// @@ -135,9 +123,6 @@ namespace PepperDash.Core.JsonToSimpl UshortPaths[index] = path; } - /// - /// Set the JPath for a string output index. - /// /// /// SetStringPath method /// @@ -148,13 +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) diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs index d26ae5b5..13354fdd 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFileMaster.cs @@ -19,17 +19,11 @@ 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 /// diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs index 2c69f055..9fa8ba01 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplFixedPathObject.cs @@ -2,9 +2,6 @@ namespace PepperDash.Core.JsonToSimpl { - /// - /// - /// /// /// Represents a JsonToSimplFixedPathObject /// diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs index 27607335..14f7eaa8 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplGenericMaster.cs @@ -5,9 +5,6 @@ using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { - /// - /// Generic Master - /// /// /// Represents a JsonToSimplGenericMaster /// @@ -23,9 +20,6 @@ namespace PepperDash.Core.JsonToSimpl // To prevent multiple same-file access static object WriteLock = new object(); - /// - /// Callback action for saving - /// /// /// Gets or sets the SaveCallback /// @@ -81,12 +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 73259d08..b3fa92a3 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplMaster.cs @@ -38,9 +38,6 @@ namespace PepperDash.Core.JsonToSimpl /// public string Key { get { return UniqueID; } } - /// - /// A unique ID - /// /// /// Gets or sets the UniqueID /// @@ -56,10 +53,6 @@ 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 /// @@ -89,9 +82,6 @@ namespace PepperDash.Core.JsonToSimpl } } - /// - /// - /// /// /// Gets or sets the JsonObject /// @@ -140,9 +130,6 @@ namespace PepperDash.Core.JsonToSimpl } } - /// - /// Called from the child to add changed or new values for saving - /// /// /// AddUnsavedValue method /// diff --git a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs index 8eae90ed..e142d1bc 100644 --- a/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs +++ b/src/PepperDash.Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs @@ -18,9 +18,6 @@ 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 /// diff --git a/src/PepperDash.Core/Logging/Debug.cs b/src/PepperDash.Core/Logging/Debug.cs index 3362a065..ff489b25 100644 --- a/src/PepperDash.Core/Logging/Debug.cs +++ b/src/PepperDash.Core/Logging/Debug.cs @@ -77,17 +77,11 @@ 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 /// @@ -99,9 +93,6 @@ namespace PepperDash.Core public static bool IsRunningOnAppliance = CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance; - /// - /// Version for the currently loaded PepperDashCore dll - /// /// /// Gets or sets the PepperDashCoreVersion /// @@ -620,9 +611,6 @@ namespace PepperDash.Core InitialParametersClass.ApplicationNumber, DoNotLoadConfigOnNextBoot); } - /// - /// - /// /// /// ShowDebugLog method /// @@ -1137,9 +1125,6 @@ namespace PepperDash.Core return string.Format("{0}{1}user{1}debugSettings{1}{2}.json",Directory.GetApplicationRootDirectory(), Path.DirectorySeparatorChar, InitialParametersClass.RoomId); } - /// - /// Error level to for message to be logged at - /// /// /// Enumeration of ErrorLogLevel values /// diff --git a/src/PepperDash.Core/Logging/DebugContext.cs b/src/PepperDash.Core/Logging/DebugContext.cs index 88567eff..bb1a5f65 100644 --- a/src/PepperDash.Core/Logging/DebugContext.cs +++ b/src/PepperDash.Core/Logging/DebugContext.cs @@ -149,9 +149,6 @@ namespace PepperDash.Core string.Format(format, items)); } - /// - /// Appends a device Key to the beginning of a message - /// /// /// Console method /// diff --git a/src/PepperDash.Core/Logging/DebugMemory.cs b/src/PepperDash.Core/Logging/DebugMemory.cs index e1894816..286707b8 100644 --- a/src/PepperDash.Core/Logging/DebugMemory.cs +++ b/src/PepperDash.Core/Logging/DebugMemory.cs @@ -4,9 +4,6 @@ using Newtonsoft.Json; namespace PepperDash.Core.Logging { - /// - /// Class to persist current Debug settings across program restarts - /// /// /// Represents a DebugContextCollection /// diff --git a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs index 0df95c29..9443be0b 100644 --- a/src/PepperDash.Core/PasswordManagement/PasswordClient.cs +++ b/src/PepperDash.Core/PasswordManagement/PasswordClient.cs @@ -2,9 +2,6 @@ namespace PepperDash.Core.PasswordManagement { - /// - /// A class to allow user interaction with the PasswordManager - /// /// /// Represents a PasswordClient /// @@ -120,9 +117,6 @@ namespace PepperDash.Core.PasswordManagement ValidatePassword(PasswordToValidate); } - /// - /// Clears the user entered password and resets the LEDs - /// /// /// ClearPassword method /// diff --git a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs index 6ec4583b..9ba008e4 100644 --- a/src/PepperDash.Core/PasswordManagement/PasswordManager.cs +++ b/src/PepperDash.Core/PasswordManagement/PasswordManager.cs @@ -4,9 +4,6 @@ using Crestron.SimplSharp; namespace PepperDash.Core.PasswordManagement { - /// - /// Allows passwords to be stored and managed - /// /// /// Represents a PasswordManager /// diff --git a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs index 61c0d689..a83f8901 100644 --- a/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs +++ b/src/PepperDash.Core/SystemInfo/EventArgs and Constants.cs @@ -68,9 +68,6 @@ namespace PepperDash.Core.SystemInfo public const ushort ProgramConfigChange = 305; } - /// - /// Processor Change Event Args Class - /// /// /// Represents a ProcessorChangeEventArgs /// @@ -117,9 +114,6 @@ namespace PepperDash.Core.SystemInfo } } - /// - /// Ethernet Change Event Args Class - /// /// /// Represents a EthernetChangeEventArgs /// @@ -171,9 +165,6 @@ namespace PepperDash.Core.SystemInfo } } - /// - /// Control Subnet Chage Event Args Class - /// /// /// Represents a ControlSubnetChangeEventArgs /// @@ -220,9 +211,6 @@ namespace PepperDash.Core.SystemInfo } } - /// - /// Program Change Event Args Class - /// /// /// Represents a ProgramChangeEventArgs /// diff --git a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs index 65d718c6..45f787f5 100644 --- a/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs +++ b/src/PepperDash.Core/SystemInfo/SystemInfoToSimpl.cs @@ -100,9 +100,6 @@ namespace PepperDash.Core.SystemInfo OnBoolChange(false, 0, SystemInfoConstants.BusyBoolChange); } - /// - /// Gets the current ethernet info - /// /// /// GetEthernetInfo method /// @@ -164,9 +161,6 @@ namespace PepperDash.Core.SystemInfo OnBoolChange(false, 0, SystemInfoConstants.BusyBoolChange); } - /// - /// Gets the current control subnet info - /// /// /// GetControlSubnetInfo method /// @@ -272,9 +266,6 @@ namespace PepperDash.Core.SystemInfo OnBoolChange(false, 0, SystemInfoConstants.BusyBoolChange); } - /// - /// Gets the processor uptime and passes it to S+ - /// /// /// RefreshProcessorUptime method /// diff --git a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs index 46ce3a96..154dc01e 100644 --- a/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs +++ b/src/PepperDash.Core/Web/RequestHandlers/DefaultRequestHandler.cs @@ -2,9 +2,6 @@ namespace PepperDash.Core.Web.RequestHandlers { - /// - /// Web API default request handler - /// /// /// Represents a DefaultRequestHandler /// diff --git a/src/PepperDash.Core/Web/WebApiServer.cs b/src/PepperDash.Core/Web/WebApiServer.cs index c8f7398f..11ec4e2f 100644 --- a/src/PepperDash.Core/Web/WebApiServer.cs +++ b/src/PepperDash.Core/Web/WebApiServer.cs @@ -25,33 +25,21 @@ 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 /// @@ -149,9 +137,6 @@ namespace PepperDash.Core.Web Start(); } - /// - /// Initializes CWS class - /// /// /// Initialize method /// @@ -194,9 +179,6 @@ namespace PepperDash.Core.Web _server.Routes.Remove(route); } - /// - /// Returns a list of the current routes - /// /// /// GetRouteCollection method /// @@ -243,9 +225,6 @@ namespace PepperDash.Core.Web } } - /// - /// Stop CWS instance - /// /// /// Stop method /// diff --git a/src/PepperDash.Core/WebApi/Presets/Preset.cs b/src/PepperDash.Core/WebApi/Presets/Preset.cs index f407a9ba..88df890c 100644 --- a/src/PepperDash.Core/WebApi/Presets/Preset.cs +++ b/src/PepperDash.Core/WebApi/Presets/Preset.cs @@ -2,9 +2,6 @@ namespace PepperDash.Core.WebApi.Presets { - /// - /// Represents a preset - /// /// /// Represents a Preset /// @@ -15,41 +12,26 @@ 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 /// @@ -66,9 +48,6 @@ namespace PepperDash.Core.WebApi.Presets } } - /// - /// - /// /// /// Represents a PresetReceivedEventArgs /// @@ -79,17 +58,11 @@ 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 /// diff --git a/src/PepperDash.Core/WebApi/Presets/User.cs b/src/PepperDash.Core/WebApi/Presets/User.cs index a7acee66..4044ae7b 100644 --- a/src/PepperDash.Core/WebApi/Presets/User.cs +++ b/src/PepperDash.Core/WebApi/Presets/User.cs @@ -16,25 +16,16 @@ 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 /// @@ -52,17 +43,11 @@ 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 /// @@ -85,9 +70,6 @@ namespace PepperDash.Core.WebApi.Presets } } - /// - /// - /// /// /// Represents a UserAndRoomMessage /// @@ -98,17 +80,11 @@ 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 /// diff --git a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs index 95ca78f0..f8c815fd 100644 --- a/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs +++ b/src/PepperDash.Core/WebApi/Presets/WebApiPasscodeClient.cs @@ -25,9 +25,6 @@ namespace PepperDash.Core.WebApi.Presets /// public event EventHandler PresetReceived; - /// - /// Unique identifier for this instance - /// /// /// Gets or sets the Key /// diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs index d079ec31..68c61d90 100644 --- a/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs +++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigAnalogToken.cs @@ -75,6 +75,7 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// ToString method /// + /// public override string ToString() { return Index + " = 0x" + Value.ToString("X4"); diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs index b02cdfc8..50fac7fc 100644 --- a/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs +++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigDigitalToken.cs @@ -73,6 +73,7 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// ToString method /// + /// public override string ToString() { return Index + " = " + (Value ? "High" : "Low"); diff --git a/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs b/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs index 6233a79c..635d40e3 100644 --- a/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs +++ b/src/PepperDash.Core/XSigUtility/Tokens/XSigSerialToken.cs @@ -79,6 +79,7 @@ namespace PepperDash.Core.Intersystem.Tokens /// /// ToString method /// + /// public override string ToString() { return Index + " = \"" + Value + "\""; diff --git a/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs b/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs index 7a4d13e7..12eeaf91 100644 --- a/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs +++ b/src/PepperDash.Core/XSigUtility/XSigTokenStreamWriter.cs @@ -139,9 +139,6 @@ namespace PepperDash.Core.Intersystem } } - /// - /// Disposes of the internal stream if specified to not leave open. - /// /// /// Dispose method /// 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 c0837401..8b82a771 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 3d08a218..ddd76d54 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 96191433..5c8d4dec 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -23,7 +23,7 @@ namespace PepperDash.Essentials.Core public Type Type { get; set; } /// - /// Gets or sets the description of the device factory + /// Gets or sets the Description /// public string Description { get; set; } @@ -43,7 +43,7 @@ namespace PepperDash.Essentials.Core } /// - /// Factory class for loading and managing device types + /// Represents a DeviceFactory /// public class DeviceFactory { @@ -141,6 +141,9 @@ namespace PepperDash.Essentials.Core /// /// /// + /// + /// GetDevice method + /// public static IKeyed GetDevice(DeviceConfig dc) { try @@ -181,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..29122bf3 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; 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..9ad1d8ea 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) @@ -333,6 +342,9 @@ namespace PepperDash.Essentials.Core } [Flags] + /// + /// Enumeration of eJoinType values + /// public enum eJoinType { None = 0, @@ -346,7 +358,7 @@ namespace PepperDash.Essentials.Core } /// - /// Metadata describing the join + /// Represents a JoinMetadata /// public class JoinMetadata { @@ -360,16 +372,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 +414,9 @@ namespace PepperDash.Essentials.Core /// Fusion Attribute Name (optional) /// [JsonProperty("attributeName")] + /// + /// Gets or sets the AttributeName + /// public string AttributeName { get; set; } } @@ -478,6 +502,9 @@ namespace PepperDash.Essentials.Core /// Sets the join offset value /// /// + /// + /// SetJoinOffset method + /// public void SetJoinOffset(uint joinOffset) { _joinOffset = joinOffset; @@ -502,11 +529,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 +556,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/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..6da9d32b 100644 --- a/src/PepperDash.Essentials.Core/Routing/Extensions.cs +++ b/src/PepperDash.Essentials.Core/Routing/Extensions.cs @@ -50,6 +50,9 @@ 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 /// /// destination to clear + /// + /// ReleaseRoute method + /// public static void ReleaseRoute(this IRoutingInputs destination) { routeRequestQueue.Enqueue(new ReleaseRouteQueueItem(ReleaseRouteInternal, destination, string.Empty, false)); @@ -60,6 +63,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 +85,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..4f07b692 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,9 @@ 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). + /// + /// ReleaseRoutes method + /// public void ReleaseRoutes(bool clearRoute = false) { foreach (var route in Routes.Where(r => r.SwitchingDevice is IRouting)) @@ -135,6 +138,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. + /// + /// ToString method + /// public override string ToString() { var routesText = Routes.Select(r => r.ToString()).ToArray(); @@ -145,10 +151,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 +180,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 +206,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 +222,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..bf3ae443 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -30,6 +30,9 @@ namespace PepperDash.Essentials.Core /// proper route releasing. /// /// + /// + /// AddRouteDescriptor method + /// public void AddRouteDescriptor(RouteDescriptor descriptor) { if (descriptor == null) @@ -51,6 +54,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) { Debug.LogMessage(LogEventLevel.Information, "Getting route descriptor for '{destination}'", destination?.Key ?? null); @@ -65,8 +71,7 @@ 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. + /// RemoveRouteDescriptor method /// public RouteDescriptor RemoveRouteDescriptor(IRoutingInputs destination, string inputPortKey = "") { @@ -87,6 +92,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 +116,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 +134,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..25c52b98 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; } @@ -70,6 +70,9 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the route request. /// /// A string describing the source and destination of the route request. + /// + /// ToString method + /// public override string ToString() { return $"Route {Source?.Key ?? "No Source Device"}:{SourcePort?.Key ?? "auto"} to {Destination?.Key ?? "No Destination Device"}:{DestinationPort?.Key ?? "auto"}"; 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..fbf48c36 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,10 @@ /// Returns a string representation of the route switch descriptor. /// /// A string describing the switch operation. + /// + /// ToString method + /// + /// public override string ToString() { if (SwitchingDevice is IRouting) @@ -54,10 +58,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 +87,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..29559829 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,10 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the input port. /// /// A string in the format "ParentDeviceKey|PortKey|SignalType|ConnectionType". + /// + /// ToString method + /// + /// public override string ToString() { return $"{ParentDevice.Key}|{Key}|{Type}|{ConnectionType}"; @@ -57,7 +61,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..336e6ea9 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 { @@ -56,6 +56,10 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the output port. /// /// A string in the format "ParentDeviceKey|PortKey|SignalType|ConnectionType". + /// + /// ToString method + /// + /// public override string ToString() { return $"{ParentDevice.Key}|{Key}|{Type}|{ConnectionType}"; @@ -65,10 +69,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 +98,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..b61d22b6 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 + /// public class RoutingPortCollection : List where T: RoutingPort { /// @@ -24,6 +24,9 @@ namespace PepperDash.Essentials.Core /* /// /// Basically a List , with an indexer to find ports by key name /// + /// + /// Represents a RoutingPortCollection + /// 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..9130cefe 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLine.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLine.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace PepperDash.Essentials.Core { /// - /// Represents a connection (tie line) between a and a . + /// Represents a TieLine /// public class TieLine { @@ -127,7 +127,7 @@ namespace PepperDash.Essentials.Core //******************************************************************************** /// - /// Represents a collection of objects. + /// Represents a TieLineCollection /// public class TieLineCollection : List { diff --git a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs index 5090f9c2..028da70a 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). - /// + /// + /// Gets or sets the SourceCard + /// public string SourceCard { get; set; } - /// - /// The key of the source output port. - /// + /// + /// Gets or sets the SourcePort + /// 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..c595e310 100644 --- a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs +++ b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs @@ -4,6 +4,9 @@ namespace PepperDash.Essentials.Core { [Flags] + /// + /// Enumeration of eRoutingSignalType values + /// public enum eRoutingSignalType { Audio = 1, diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs index 4614e661..17db0a54 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 + /// + /// GetSecret method + /// public ISecret GetSecret(string key) { string mySecret; @@ -93,6 +105,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/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..70468301 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs @@ -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..ea7620e0 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 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/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 cbf53476..f1176730 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs @@ -8,6 +8,9 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Cameras { + /// + /// Enumeration of eCameraControlMode values + /// public enum eCameraControlMode { Manual = 0, @@ -16,6 +19,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } + /// + /// Defines the contract for IHasCameras + /// public interface IHasCameras { event EventHandler CameraSelected; @@ -30,7 +36,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 { @@ -62,8 +68,14 @@ namespace PepperDash.Essentials.Devices.Common.Cameras event EventHandler VideoUnmuteRequested; } + /// + /// Represents a CameraSelectedEventArgs + /// public class CameraSelectedEventArgs : EventArgs { + /// + /// Gets or sets the SelectedCamera + /// public CameraBase SelectedCamera { get; private set; } public CameraSelectedEventArgs(CameraBase camera) @@ -72,6 +84,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } } + /// + /// Defines the contract for IHasFarEndCameraControl + /// public interface IHasFarEndCameraControl { CameraBase FarEndCamera { get; } @@ -81,7 +96,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Used to decorate a camera as a far end + /// Defines the contract for IAmFarEndCamera /// public interface IAmFarEndCamera { @@ -93,7 +108,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 { @@ -114,7 +129,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Interface for camera tilt control + /// Defines the contract for IHasCameraTiltControl /// public interface IHasCameraTiltControl : IHasCameraControls { @@ -124,7 +139,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Interface for camera zoom control + /// Defines the contract for IHasCameraZoomControl /// public interface IHasCameraZoomControl : IHasCameraControls { @@ -134,7 +149,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras } /// - /// Interface for camera focus control + /// Defines the contract for IHasCameraFocusControl /// public interface IHasCameraFocusControl : IHasCameraControls { @@ -152,6 +167,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras void ToggleFocusMode(); } + /// + /// Defines the contract for IHasCameraAutoMode + /// public interface IHasCameraAutoMode : IHasCameraControls { void CameraAutoModeOn(); 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/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/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 36a94781..dc9dd947 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs @@ -6,10 +6,13 @@ using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers { + /// + /// Represents a CameraBaseMessenger + /// 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/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 b17e0490..611abd3a 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; } /// @@ -1085,8 +1097,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; @@ -1099,11 +1117,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)) @@ -1177,6 +1201,10 @@ namespace PepperDash.Essentials messenger.RegisterWithAppServer(this); } + /// + /// Initialize method + /// + /// public override void Initialize() { foreach (var messenger in _messengers) @@ -1219,6 +1247,9 @@ namespace PepperDash.Essentials #region IMobileControl Members + /// + /// GetAppServer method + /// public static IMobileControl GetAppServer() { try @@ -1281,6 +1312,9 @@ namespace PepperDash.Essentials return true; } + /// + /// LinkSystemMonitorToAppServer method + /// public void LinkSystemMonitorToAppServer() { if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Appliance) @@ -1372,6 +1406,9 @@ namespace PepperDash.Essentials CleanUpWebsocketClient(); } + /// + /// PrintActionDictionaryPaths method + /// public void PrintActionDictionaryPaths(object o) { CrestronConsole.ConsoleCommandResponse("ActionDictionary Contents:\r\n"); @@ -1443,6 +1480,9 @@ namespace PepperDash.Essentials /// Removes an action from the dictionary /// /// + /// + /// RemoveAction method + /// public void RemoveAction(string key) { if (_actionDictionary.ContainsKey(key)) @@ -1456,6 +1496,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)); @@ -1667,7 +1710,7 @@ Mobile Control Direct Server Infromation: } /// - /// Registers the room with the server + /// RegisterSystemToServer method /// public void RegisterSystemToServer() { @@ -1900,6 +1943,9 @@ Mobile Control Direct Server Infromation: SendMessageObject(msg); } + /// + /// GetConfigWithPluginVersion method + /// public MobileControlEssentialsConfig GetConfigWithPluginVersion() { // Populate the application name and version number @@ -1932,6 +1978,9 @@ Mobile Control Direct Server Infromation: return confObject; } + /// + /// SetClientUrl method + /// public void SetClientUrl(string path, string roomKey = null) { var message = new MobileControlMessage @@ -1947,6 +1996,9 @@ Mobile Control Direct Server Infromation: /// Sends any object type to server /// /// + /// + /// SendMessageObject method + /// public void SendMessageObject(IMobileControlMessage o) { @@ -1969,6 +2021,9 @@ Mobile Control Direct Server Infromation: } + /// + /// SendMessageObjectToDirectClient method + /// public void SendMessageObjectToDirectClient(object o) { if ( @@ -2167,6 +2222,9 @@ Mobile Control Direct Server Infromation: action(code.Value(), qrChecksum.Value()); } + /// + /// HandleClientMessage method + /// public void HandleClientMessage(string message) { _receiveQueue.Enqueue(new ProcessStringMessage(message, ParseStreamRx)); @@ -2330,6 +2388,9 @@ Mobile Control Direct Server Infromation: } } + /// + /// Represents a ClientSpecificUpdateRequest + /// public class ClientSpecificUpdateRequest { public ClientSpecificUpdateRequest(Action action) @@ -2337,9 +2398,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/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 5266a840..56615017 100644 --- a/src/PepperDash.Essentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -68,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 @@ -165,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() { @@ -252,7 +251,7 @@ namespace PepperDash.Essentials } /// - /// Begins the process of loading resources including plugins and configuration data + /// GoWithLoad method /// public void GoWithLoad() { @@ -348,9 +347,9 @@ namespace PepperDash.Essentials return configExists; } - /// - /// - /// + /// + /// TearDown method + /// public void TearDown() { Debug.LogMessage(LogEventLevel.Information, "Tearing down existing system"); @@ -386,7 +385,7 @@ namespace PepperDash.Essentials } /// - /// Reads all devices from config and adds them to DeviceManager + /// LoadDevices method /// public void LoadDevices() { @@ -447,7 +446,7 @@ namespace PepperDash.Essentials /// - /// Helper method to load tie lines. This should run after devices have loaded + /// LoadTieLines method /// public void LoadTieLines() { @@ -473,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/HttpLogoServer.cs b/src/PepperDash.Essentials/HttpLogoServer.cs index 1f400f92..d5d133e6 100644 --- a/src/PepperDash.Essentials/HttpLogoServer.cs +++ b/src/PepperDash.Essentials/HttpLogoServer.cs @@ -121,6 +121,9 @@ namespace PepperDash.Essentials /// /// 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"; From c70a8edc246b0df5f47f735d577a80cd61bb0e0f Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:11:33 -0500 Subject: [PATCH 07/42] docs: remove duplicate documentation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Secrets/CrestronGlobalSecretsProvider.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs index 17db0a54..4bff68c5 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs @@ -80,9 +80,9 @@ namespace PepperDash.Essentials.Core /// /// Secret Key /// ISecret Object containing key, provider, and value - /// - /// GetSecret method - /// + + + public ISecret GetSecret(string key) { string mySecret; From 5b73f8fbd266ae05dc0fe4293dd629673e1cfedd Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:12:03 -0500 Subject: [PATCH 08/42] docs: remove duplicate docs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Secrets/CrestronGlobalSecretsProvider.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs index 4bff68c5..83d0a0a8 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs @@ -105,9 +105,6 @@ namespace PepperDash.Essentials.Core /// /// Secret Key /// bool if present - /// - /// TestSecret method - /// public bool TestSecret(string key) { string mySecret; From 41fd4d6adcd70d2a05c5a06f4eeb64d411a70c3f Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:12:25 -0500 Subject: [PATCH 09/42] docs: revert to original documentation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs index 028da70a..7c09a40d 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs @@ -24,7 +24,7 @@ namespace PepperDash.Essentials.Core.Config public string SourceKey { get; set; } /// - /// Gets or sets the SourceCard + /// The key of the source card (if applicable, e.g., in a modular chassis). /// public string SourceCard { get; set; } From f6f1619bc22949c04f71cf73bb49d2927d3426df Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:12:38 -0500 Subject: [PATCH 10/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs index 336e6ea9..c1cadfb1 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs @@ -56,10 +56,6 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the output port. /// /// A string in the format "ParentDeviceKey|PortKey|SignalType|ConnectionType". - /// - /// ToString method - /// - /// public override string ToString() { return $"{ParentDevice.Key}|{Key}|{Type}|{ConnectionType}"; From b8ab54cbe034d0f068f35f9d2d304c234ccfc47b Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:12:55 -0500 Subject: [PATCH 11/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Routing/RoutingPortCollection.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs index b61d22b6..14758d79 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs @@ -24,9 +24,6 @@ namespace PepperDash.Essentials.Core /* /// /// Basically a List , with an indexer to find ports by key name /// - /// - /// Represents a RoutingPortCollection - /// public class RoutingPortCollection : List where T : RoutingPort { /// From 4fbfda62d69407d02230b426b18be22a6792eee0 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:13:21 -0500 Subject: [PATCH 12/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RouteRequest.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs b/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs index 25c52b98..30c0e5f8 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs @@ -70,9 +70,6 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the route request. /// /// A string describing the source and destination of the route request. - /// - /// ToString method - /// public override string ToString() { return $"Route {Source?.Key ?? "No Source Device"}:{SourcePort?.Key ?? "auto"} to {Destination?.Key ?? "No Destination Device"}:{DestinationPort?.Key ?? "auto"}"; From 5a2a2129e6d7d522e3776f7d64d356d59a2cd693 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:13:33 -0500 Subject: [PATCH 13/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Routing/RouteDescriptorCollection.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs index bf3ae443..cc10a07b 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -30,9 +30,6 @@ namespace PepperDash.Essentials.Core /// proper route releasing. /// /// - /// - /// AddRouteDescriptor method - /// public void AddRouteDescriptor(RouteDescriptor descriptor) { if (descriptor == null) From 5fe99518a0ab85b7201e1fb1607bf4f6f0663be9 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:18:50 -0500 Subject: [PATCH 14/42] docs: update formatting Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Routing/eRoutingSignalType.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs index c595e310..bab815fc 100644 --- a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs +++ b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs @@ -4,10 +4,10 @@ namespace PepperDash.Essentials.Core { [Flags] - /// - /// Enumeration of eRoutingSignalType values - /// - public enum eRoutingSignalType + /// + /// Enumeration of eRoutingSignalType values + /// + public enum eRoutingSignalType { Audio = 1, Video = 2, From 4fa8433e73574e456b8aa0dd3423c6e0460e87d7 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:19:10 -0500 Subject: [PATCH 15/42] docs: change wording Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs index 7c09a40d..6317fb01 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs @@ -29,7 +29,7 @@ namespace PepperDash.Essentials.Core.Config public string SourceCard { get; set; } /// - /// Gets or sets the SourcePort + /// The key of the source output port, used to identify the specific port on the source device for routing. /// public string SourcePort { get; set; } From 5ee7aaa9915a028d0fb8de3f4741f2077db21de6 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:29:25 -0500 Subject: [PATCH 16/42] docs: revert to old comment Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/TieLine.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PepperDash.Essentials.Core/Routing/TieLine.cs b/src/PepperDash.Essentials.Core/Routing/TieLine.cs index 9130cefe..d85f1c88 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 TieLine + /// 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 { From 3ffad13abf6313743d06e158b7d93c2c97923400 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:30:04 -0500 Subject: [PATCH 17/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs index 29559829..08876121 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs @@ -45,9 +45,6 @@ namespace PepperDash.Essentials.Core /// Returns a string representation of the input port. /// /// A string in the format "ParentDeviceKey|PortKey|SignalType|ConnectionType". - /// - /// ToString method - /// /// public override string ToString() { From aee40ffe144a8cd71296e7bc6257027c8a6799e0 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:36:43 -0500 Subject: [PATCH 18/42] docs: fix duplicate XML tags Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs index fbf48c36..ad68f426 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs @@ -42,8 +42,6 @@ /// Returns a string representation of the route switch descriptor. /// /// A string describing the switch operation. - /// - /// ToString method /// /// public override string ToString() From 130c874684efb6efa080b85eec2dfd313bf00b32 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 11:37:08 -0500 Subject: [PATCH 19/42] docs: fix documentation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Routing/RouteDescriptorCollection.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs index cc10a07b..dd4f9f7d 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -48,11 +48,7 @@ namespace PepperDash.Essentials.Core } /// - /// Gets the RouteDescriptor for a destination - /// - /// null if no RouteDescriptor for a destination exists - /// - /// GetRouteDescriptorForDestination method + /// Gets the RouteDescriptor for a destination. Returns null if no RouteDescriptor for a destination exists. /// public RouteDescriptor GetRouteDescriptorForDestination(IRoutingInputs destination) { From df201558a5fa7504638977d523b5137bbfc983ff Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:02:24 -0500 Subject: [PATCH 20/42] docs: update Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs index 6317fb01..7c09a40d 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs @@ -29,7 +29,7 @@ namespace PepperDash.Essentials.Core.Config public string SourceCard { get; set; } /// - /// The key of the source output port, used to identify the specific port on the source device for routing. + /// Gets or sets the SourcePort /// public string SourcePort { get; set; } From 78e9ea807094882f632b1214c1138adf4df2c26f Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:02:38 -0500 Subject: [PATCH 21/42] docs: duplicate tags Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs index ad68f426..12aebdcf 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs @@ -42,7 +42,6 @@ /// Returns a string representation of the route switch descriptor. /// /// A string describing the switch operation. - /// /// public override string ToString() { From 53b1e5d142c6501e7488e9861bc4f5232eaca984 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:03:03 -0500 Subject: [PATCH 22/42] docs: remove duplicates Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Routing/RouteSwitchDescriptor.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs index 12aebdcf..0edf2de7 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs @@ -53,23 +53,20 @@ } /*/// - /// Represents an individual link for a route - /// - /// - /// Represents a RouteSwitchDescriptor + /// Represents a RouteSwitchDescriptor with generic input and output selectors. /// public class RouteSwitchDescriptor { /// - /// Gets or sets the SwitchingDevice + /// Gets or sets the SwitchingDevice. /// public IRoutingInputs SwitchingDevice { get { return InputPort.ParentDevice; } } /// - /// Gets or sets the OutputPort + /// Gets or sets the OutputPort. /// public RoutingOutputPort OutputPort { get; set; } /// - /// Gets or sets the InputPort + /// Gets or sets the InputPort. /// public RoutingInputPort InputPort { get; set; } From f9a74567d21c4f5008e9ca5ce9568d4b83fce69e Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:03:18 -0500 Subject: [PATCH 23/42] docs: remove duplicates Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Routing/RouteDescriptorCollection.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs index dd4f9f7d..532a1b64 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -83,10 +83,7 @@ namespace PepperDash.Essentials.Core } /*/// - /// A collection of RouteDescriptors - typically the static DefaultCollection is used - /// - /// - /// Represents a RouteDescriptorCollection + /// Represents a RouteDescriptorCollection - typically the static DefaultCollection is used /// public class RouteDescriptorCollection { From fc1e29565e87dd05f30fa008dbe35eb53105fcf2 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:03:33 -0500 Subject: [PATCH 24/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs index 4f07b692..c4ac1025 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs @@ -95,9 +95,6 @@ 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). - /// - /// ReleaseRoutes method - /// public void ReleaseRoutes(bool clearRoute = false) { foreach (var route in Routes.Where(r => r.SwitchingDevice is IRouting)) From 899f13eadb626453147c266fbe79051580bd572b Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:08:10 -0500 Subject: [PATCH 25/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs index c4ac1025..5fcf10cb 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs @@ -146,10 +146,7 @@ namespace PepperDash.Essentials.Core } /*/// - /// Represents an collection of individual route steps between Source and Destination - /// - /// - /// Represents a RouteDescriptor + /// Represents a collection of individual route steps between Source and Destination for a specific signal type. /// public class RouteDescriptor { From b283ed34b4ad6151be2e3c6412e2a954a4a284fa Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 22 Jul 2025 12:08:28 -0500 Subject: [PATCH 26/42] docs: remove duplicate Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Routing/Extensions.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Routing/Extensions.cs b/src/PepperDash.Essentials.Core/Routing/Extensions.cs index 6da9d32b..17f1e50d 100644 --- a/src/PepperDash.Essentials.Core/Routing/Extensions.cs +++ b/src/PepperDash.Essentials.Core/Routing/Extensions.cs @@ -47,12 +47,9 @@ 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 - /// - /// ReleaseRoute method - /// public static void ReleaseRoute(this IRoutingInputs destination) { routeRequestQueue.Enqueue(new ReleaseRouteQueueItem(ReleaseRouteInternal, destination, string.Empty, false)); From 80da4ad98f79445cd5da2cfe44fd6184ea9e8743 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:40:17 +0000 Subject: [PATCH 27/42] docs: fix duplicate and malformed XML documentation tags Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com> --- src/PepperDash.Core/Comm/GenericSshClient.cs | 4 ++-- src/PepperDash.Core/Device.cs | 14 ++++++------- src/PepperDash.Core/Logging/DebugContext.cs | 6 +++--- .../Feedbacks/FeedbackBase.cs | 6 +++--- .../JoinMaps/JoinMapBase.cs | 20 +++++++++---------- .../Routing/RouteDescriptor.cs | 8 +++++++- .../Routing/RouteDescriptorCollection.cs | 5 ++++- .../Routing/RouteSwitchDescriptor.cs | 11 ++++++---- .../SubpageReferenceList.cs | 6 +++--- .../VideoStatus/VideoStatusOutputs.cs | 6 +++--- .../AudioCodec/Interfaces/IHasAudioCodec.cs | 6 +++--- .../VideoCodec/Interfaces/IHasVideoCodec.cs | 6 +++--- 12 files changed, 55 insertions(+), 43 deletions(-) diff --git a/src/PepperDash.Core/Comm/GenericSshClient.cs b/src/PepperDash.Core/Comm/GenericSshClient.cs index 2817ccd4..3ba9059e 100644 --- a/src/PepperDash.Core/Comm/GenericSshClient.cs +++ b/src/PepperDash.Core/Comm/GenericSshClient.cs @@ -36,7 +36,7 @@ namespace PepperDash.Core /// public event EventHandler ConnectionChange; - ///// + /// ///// ///// //public event GenericSocketStatusChangeEventDelegate SocketStatusChange; @@ -79,7 +79,7 @@ namespace PepperDash.Core } /// - /// + /// Socket status change event /// public SocketStatus ClientStatus { diff --git a/src/PepperDash.Core/Device.cs b/src/PepperDash.Core/Device.cs index 27548b0a..7124550e 100644 --- a/src/PepperDash.Core/Device.cs +++ b/src/PepperDash.Core/Device.cs @@ -24,14 +24,14 @@ namespace PepperDash.Core /// 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; diff --git a/src/PepperDash.Core/Logging/DebugContext.cs b/src/PepperDash.Core/Logging/DebugContext.cs index bb1a5f65..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; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs index 29122bf3..d4caa7e5 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs @@ -80,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/JoinMaps/JoinMapBase.cs b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs index 9ad1d8ea..9fca8e12 100644 --- a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs @@ -303,22 +303,22 @@ namespace PepperDash.Essentials.Core PrintJoinMapInfo(); } - ///// - ///// Returns the join number for the join with the specified key - ///// - ///// - ///// + /// + /// 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 + /// + /// + /// //public uint GetJoinSpanForKey(string key) //{ // return Joins.ContainsKey(key) ? Joins[key].JoinSpan : 0; diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs index 5fcf10cb..4f07b692 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs @@ -95,6 +95,9 @@ 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). + /// + /// ReleaseRoutes method + /// public void ReleaseRoutes(bool clearRoute = false) { foreach (var route in Routes.Where(r => r.SwitchingDevice is IRouting)) @@ -146,7 +149,10 @@ namespace PepperDash.Essentials.Core } /*/// - /// Represents a collection of individual route steps between Source and Destination for a specific signal type. + /// Represents an collection of individual route steps between Source and Destination + /// + /// + /// Represents a RouteDescriptor /// public class RouteDescriptor { diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs index 532a1b64..dd4f9f7d 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -83,7 +83,10 @@ namespace PepperDash.Essentials.Core } /*/// - /// Represents a RouteDescriptorCollection - typically the static DefaultCollection is used + /// A collection of RouteDescriptors - typically the static DefaultCollection is used + /// + /// + /// Represents a RouteDescriptorCollection /// public class RouteDescriptorCollection { diff --git a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs index 0edf2de7..12aebdcf 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs @@ -53,20 +53,23 @@ } /*/// - /// Represents a RouteSwitchDescriptor with generic input and output selectors. + /// Represents an individual link for a route + /// + /// + /// Represents a RouteSwitchDescriptor /// public class RouteSwitchDescriptor { /// - /// Gets or sets the SwitchingDevice. + /// Gets or sets the SwitchingDevice /// public IRoutingInputs SwitchingDevice { get { return InputPort.ParentDevice; } } /// - /// Gets or sets the OutputPort. + /// Gets or sets the OutputPort /// public RoutingOutputPort OutputPort { get; set; } /// - /// Gets or sets the InputPort. + /// Gets or sets the InputPort /// public RoutingInputPort InputPort { get; set; } diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs index 70468301..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; } diff --git a/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs index ea7620e0..9a929234 100644 --- a/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs +++ b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs @@ -94,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.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/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; } /// From b12cdbc75c3cb4420a521393df3ef6b1520b4595 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 23 Jul 2025 09:08:10 -0500 Subject: [PATCH 28/42] docs: apply suggestions from copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../JoinMaps/JoinMapBase.cs | 6 +----- .../Routing/RouteDescriptor.cs | 11 +++++------ .../Routing/RouteDescriptorCollection.cs | 5 ++++- .../Routing/RoutingPortCollection.cs | 2 +- src/PepperDash.Essentials.Core/Routing/TieLine.cs | 3 ++- .../Routing/TieLineConfig.cs | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs index 9fca8e12..01f71098 100644 --- a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs @@ -304,14 +304,10 @@ namespace PepperDash.Essentials.Core } /// - /// Returns the join number for the join with the specified key + /// Returns the join span for the join with the specified key /// /// /// - //public uint GetJoinForKey(string key) - //{ - // return Joins.ContainsKey(key) ? Joins[key].JoinNumber : 0; - //} /// diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs index 4f07b692..aab82d38 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs @@ -95,9 +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). - /// - /// ReleaseRoutes method - /// + + public void ReleaseRoutes(bool clearRoute = false) { foreach (var route in Routes.Where(r => r.SwitchingDevice is IRouting)) @@ -138,9 +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. - /// - /// 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 dd4f9f7d..f389f719 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -64,8 +64,11 @@ namespace PepperDash.Essentials.Core } /// - /// RemoveRouteDescriptor method + /// 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); diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs index 14758d79..7ee349b5 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs @@ -5,7 +5,7 @@ using System.Linq; namespace PepperDash.Essentials.Core { /// - /// Represents a RoutingPortCollection + /// 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 d85f1c88..42f024b4 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLine.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLine.cs @@ -128,7 +128,8 @@ namespace PepperDash.Essentials.Core //******************************************************************************** /// - /// Represents a TieLineCollection + /// 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 7c09a40d..8143c1f5 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs @@ -29,7 +29,7 @@ namespace PepperDash.Essentials.Core.Config public string SourceCard { get; set; } /// - /// Gets or sets the SourcePort + /// The key of the source output port, used for routing configurations. /// public string SourcePort { get; set; } From 0069233e134f7e67d93eb210ec9b9cf472ea021b Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 24 Jul 2025 16:16:05 -0600 Subject: [PATCH 29/42] Update src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Cameras/CameraControl.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs index 3212c186..883d6ca4 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs @@ -54,9 +54,9 @@ namespace PepperDash.Essentials.Devices.Common.Cameras StringFeedback SelectedCameraFeedback { get; } /// - /// + /// Selects a camera from the list of available cameras based on the provided key. /// - /// + /// The unique identifier or name of the camera to select. void SelectCamera(string key); } From 86e4d2f7fb97449a2dbab9cb0d1737861c5dc482 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 24 Jul 2025 16:39:28 -0600 Subject: [PATCH 30/42] feat: Update SendFullStatus to target specific clients Modified the `SendFullStatus` method to accept a `string clientId` parameter, allowing it to send status messages to specific clients. Updated the action for `"/fullStatus"` to pass the client ID and adjusted the `PostStatusMessage` call accordingly. --- .../Messengers/IHasCamerasMessenger.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs index ffd1a605..4fa0c5b1 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCamerasMessenger.cs @@ -51,7 +51,7 @@ namespace PepperDash.Essentials.AppServer.Messengers AddAction("/fullStatus", (id, context) => { - SendFullStatus(); + SendFullStatus(id); }); AddAction("/selectCamera", (id, content) => @@ -69,7 +69,7 @@ namespace PepperDash.Essentials.AppServer.Messengers }); } - private void SendFullStatus() + private void SendFullStatus(string clientId) { var state = new IHasCamerasStateMessage { @@ -77,7 +77,7 @@ namespace PepperDash.Essentials.AppServer.Messengers SelectedCamera = CameraController.SelectedCamera }; - PostStatusMessage(state); + PostStatusMessage(state, clientId); } From 8db559f1975115607d08d59825db91224f0226d9 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 08:28:55 -0500 Subject: [PATCH 31/42] feat: factory updates & refactoring This commit introduces significant updates to the device factory system, enhancing the way devices are created and managed within the PepperDash Essentials framework. The changes include: - New attributes for device configuration and description. - Refactoring of the device manager and essentials device classes to support new factory methods. - modified factory classes for essentials devices, plugin development devices, and processor extension devices. - The device factory interface has been updated to include a factory method for creating devices. - Added a wrapper for the device factory to streamline device creation. - Updated plugin loader to accommodate the new device factory structure. Fixes #1065 Fixed #1277 --- .../Devices/ConfigSnippetAttribute.cs | 33 +++ .../Devices/DescriptionAttribute.cs | 32 +++ .../Devices/DeviceManager.cs | 70 ++--- .../Devices/EssentialsDevice.cs | 160 ++--------- .../Devices/EssentialsDeviceFactory.cs | 27 ++ ...ssentialsPluginDevelopmentDeviceFactory.cs | 18 ++ .../Devices/EssentialsPluginDeviceFactory.cs | 14 + .../ProcessorExtensionDeviceFactory.cs | 41 +++ .../Factory/DeviceFactory.cs | 251 +++++++++++------- .../Factory/DeviceFactoryWrapper.cs | 43 +++ .../Factory/IDeviceFactory.cs | 23 +- .../Plugins/IPluginDeviceFactory.cs | 10 +- .../Plugins/PluginLoader.cs | 111 ++++++-- .../DeviceFactory.cs | 23 +- .../MobileControlFactory.cs | 27 +- src/PepperDash.Essentials/ControlSystem.cs | 132 ++++----- .../Factory/DeviceFactory.cs | 26 +- 17 files changed, 662 insertions(+), 379 deletions(-) create mode 100644 src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs create mode 100644 src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs diff --git a/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs b/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs new file mode 100644 index 00000000..76d3640c --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs @@ -0,0 +1,33 @@ +using System; + +namespace PepperDash.Essentials.Core +{ + /// + /// Represents a ConfigSnippetAttribute + /// + [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] + public class ConfigSnippetAttribute : Attribute + { + private string _ConfigSnippet; + + /// + /// Represents a configuration snippet for the device. + /// + /// + public ConfigSnippetAttribute(string configSnippet) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Setting Config Snippet {0}", configSnippet); + _ConfigSnippet = configSnippet; + } + + /// + /// Gets the configuration snippet for the device. + /// This snippet can be used in the DeviceConfig to instantiate the device. + /// + public string ConfigSnippet + { + get { return _ConfigSnippet; } + } + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs b/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs new file mode 100644 index 00000000..6d4073d9 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs @@ -0,0 +1,32 @@ +using System; + +namespace PepperDash.Essentials.Core +{ + /// + /// Represents a description attribute for a device. + /// + [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] + public class DescriptionAttribute : Attribute + { + private string _Description; + + /// + /// Represents a description attribute for a device. + /// + /// + public DescriptionAttribute(string description) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Setting Description: {0}", description); + _Description = description; + } + + /// + /// Gets the description for the device. + /// + public string Description + { + get { return _Description; } + } + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs index fd116aed..7572835e 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs @@ -1,26 +1,38 @@ -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using PepperDash.Core; -using Serilog.Events; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using PepperDash.Core; +using Serilog.Events; namespace PepperDash.Essentials.Core { + /// + /// Manages the devices in the system + /// public static class DeviceManager { + /// + /// Raised when all devices have been activated + /// public static event EventHandler AllDevicesActivated; + + /// + /// Raised when all devices have been registered + /// public static event EventHandler AllDevicesRegistered; + + /// + /// Raised when all devices have been initialized + /// public static event EventHandler AllDevicesInitialized; private static readonly CCriticalSection DeviceCriticalSection = new CCriticalSection(); - private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true); - //public static List Devices { get { return _Devices; } } - //static List _Devices = new List(); + private static readonly CEvent AllowAddDevicesCEvent = new CEvent(false, true); private static readonly Dictionary Devices = new Dictionary(StringComparer.OrdinalIgnoreCase); @@ -74,7 +86,7 @@ namespace PepperDash.Essentials.Core foreach (var d in Devices.Values) { try - { + { if (d is Device) (d as Device).PreActivate(); } @@ -188,27 +200,6 @@ namespace PepperDash.Essentials.Core } } - //static void ListMethods(string devKey) - //{ - // var dev = GetDeviceForKey(devKey); - // if(dev != null) - // { - // var type = dev.GetType().GetType(); - // var methods = type.GetMethods(BindingFlags.Public|BindingFlags.Instance); - // var sb = new StringBuilder(); - // sb.AppendLine(string.Format("{2} methods on [{0}] ({1}):", dev.Key, type.Name, methods.Length)); - // foreach (var m in methods) - // { - // sb.Append(string.Format("{0}(", m.Name)); - // var pars = m.GetParameters(); - // foreach (var p in pars) - // sb.Append(string.Format("({1}){0} ", p.Name, p.ParameterType.Name)); - // sb.AppendLine(")"); - // } - // CrestronConsole.ConsoleCommandResponse(sb.ToString()); - // } - //} - private static void ListDevices(string s) { Debug.LogMessage(LogEventLevel.Information, "{0} Devices registered with Device Manager:", Devices.Count); @@ -397,6 +388,25 @@ namespace PepperDash.Essentials.Core return null; } + /// + /// GetDeviceForKey method + /// + /// + public static T GetDeviceForKey(string key) + { + //return _Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); + if (key == null || !Devices.ContainsKey(key)) + return default; + + if (!(Devices[key] is T)) + { + Debug.LogMessage(LogEventLevel.Error, "Device with key '{0}' is not of type '{1}'", key, typeof(T).Name); + return default; + } + + return (T)Devices[key]; + } + /// /// Console handler that simulates com port data receive /// diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs index 2fcbf1a4..59fba681 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs @@ -1,12 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using System.Reflection; - +using System.Threading.Tasks; using PepperDash.Core; -using PepperDash.Essentials.Core.Config; using Serilog.Events; namespace PepperDash.Essentials.Core @@ -17,9 +11,16 @@ namespace PepperDash.Essentials.Core [Description("The base Essentials Device Class")] public abstract class EssentialsDevice : Device { + /// + /// Event raised when the device is initialized. + /// public event EventHandler Initialized; private bool _isInitialized; + + /// + /// Gets a value indicating whether the device is initialized. + /// public bool IsInitialized { get { return _isInitialized; } @@ -36,12 +37,21 @@ namespace PepperDash.Essentials.Core } } + /// + /// Initializes a new instance of the EssentialsDevice class. + /// + /// The unique identifier for the device. protected EssentialsDevice(string key) : base(key) { SubscribeToActivateComplete(); } + /// + /// Initializes a new instance of the EssentialsDevice class. + /// + /// The unique identifier for the device. + /// The name of the device. protected EssentialsDevice(string key, string name) : base(key, name) { @@ -55,7 +65,7 @@ namespace PepperDash.Essentials.Core private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs) { - CrestronInvoke.BeginInvoke((o) => + Task.Run(() => { try { @@ -90,138 +100,4 @@ namespace PepperDash.Essentials.Core } } - - [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] - public class DescriptionAttribute : Attribute - { - private string _Description; - - public DescriptionAttribute(string description) - { - //Debug.LogMessage(LogEventLevel.Verbose, "Setting Description: {0}", description); - _Description = description; - } - - public string Description - { - get { return _Description; } - } - } - - [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] - /// - /// Represents a ConfigSnippetAttribute - /// - public class ConfigSnippetAttribute : Attribute - { - private string _ConfigSnippet; - - public ConfigSnippetAttribute(string configSnippet) - { - //Debug.LogMessage(LogEventLevel.Verbose, "Setting Config Snippet {0}", configSnippet); - _ConfigSnippet = configSnippet; - } - - public string ConfigSnippet - { - get { return _ConfigSnippet; } - } - } - - /// - /// Devices the basic needs for a Device Factory - /// - public abstract class EssentialsDeviceFactory : IDeviceFactory where T:EssentialsDevice - { - #region IDeviceFactory Members - - /// - /// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device - /// - public List TypeNames { get; protected set; } - - /// - /// LoadTypeFactories method - /// - public void LoadTypeFactories() - { - foreach (var typeName in TypeNames) - { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); - var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; - var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; - DeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); - } - } - - /// - /// The method that will build the device - /// - /// The device config - /// An instance of the device - public abstract EssentialsDevice BuildDevice(DeviceConfig dc); - - #endregion - } - - public abstract class ProcessorExtensionDeviceFactory : IProcessorExtensionDeviceFactory where T: EssentialsDevice - { - #region IProcessorExtensionDeviceFactory Members - - /// - /// Gets or sets the TypeNames - /// - public List TypeNames { get; protected set; } - - /// - /// LoadFactories method - /// - public void LoadFactories() - { - foreach (var typeName in TypeNames) - { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); - var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; - var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; - ProcessorExtensionDeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); - } - } - - /// - /// The method that will build the device - /// - /// The device config - /// An instance of the device - public abstract EssentialsDevice BuildDevice(DeviceConfig dc); - - #endregion - - } - - /// - /// Devices the basic needs for a Device Factory - /// - public abstract class EssentialsPluginDeviceFactory : EssentialsDeviceFactory, IPluginDeviceFactory where T : EssentialsDevice - { - /// - /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") - /// - public string MinimumEssentialsFrameworkVersion { get; protected set; } - } - - public abstract class EssentialsPluginDevelopmentDeviceFactory : EssentialsDeviceFactory, IPluginDevelopmentDeviceFactory where T : EssentialsDevice - { - /// - /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") - /// - public string MinimumEssentialsFrameworkVersion { get; protected set; } - - /// - /// Gets or sets the DevelopmentEssentialsFrameworkVersions - /// - public List DevelopmentEssentialsFrameworkVersions { get; protected set; } - } - } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs new file mode 100644 index 00000000..3ac326bf --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core +{ + /// + /// Provides the basic needs for a Device Factory + /// + public abstract class EssentialsDeviceFactory : IDeviceFactory where T : EssentialsDevice + { + /// + public Type FactoryType => typeof(T); + + /// + /// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device + /// + public List TypeNames { get; protected set; } + + /// + /// The method that will build the device + /// + /// The device config + /// An instance of the device + public abstract EssentialsDevice BuildDevice(DeviceConfig dc); + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs new file mode 100644 index 00000000..62864551 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; + +namespace PepperDash.Essentials.Core +{ + public abstract class EssentialsPluginDevelopmentDeviceFactory : EssentialsDeviceFactory, IPluginDevelopmentDeviceFactory where T : EssentialsDevice + { + /// + /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") + /// + public string MinimumEssentialsFrameworkVersion { get; protected set; } + + /// + /// Gets or sets the DevelopmentEssentialsFrameworkVersions + /// + public List DevelopmentEssentialsFrameworkVersions { get; protected set; } + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs new file mode 100644 index 00000000..7a891905 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs @@ -0,0 +1,14 @@ +namespace PepperDash.Essentials.Core +{ + /// + /// Devices the basic needs for a Device Factory + /// + public abstract class EssentialsPluginDeviceFactory : EssentialsDeviceFactory, IPluginDeviceFactory where T : EssentialsDevice + { + /// + /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") + /// + public string MinimumEssentialsFrameworkVersion { get; protected set; } + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs new file mode 100644 index 00000000..469d18ec --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core +{ + public abstract class ProcessorExtensionDeviceFactory : IProcessorExtensionDeviceFactory where T : EssentialsDevice + { + #region IProcessorExtensionDeviceFactory Members + + /// + /// Gets or sets the TypeNames + /// + public List TypeNames { get; protected set; } + + /// + /// LoadFactories method + /// + public void LoadFactories() + { + foreach (var typeName in TypeNames) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + ProcessorExtensionDeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); + } + } + + /// + /// The method that will build the device + /// + /// The device config + /// An instance of the device + public abstract EssentialsDevice BuildDevice(DeviceConfig dc); + + #endregion + + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index 5c8d4dec..08aa67cf 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -1,123 +1,162 @@  -using Crestron.SimplSharp; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using System.Reflection; +using Crestron.SimplSharp; using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core.Config; using Serilog.Events; -using System; -using System.Collections.Generic; -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; - Description = "Not Available"; - } - } - - /// - /// Represents a DeviceFactory + /// Provides functionality for managing and registering device factories, including loading plugin-based factories and + /// retrieving devices based on their configuration. /// + /// The class is responsible for discovering and registering device factories + /// from plugins, as well as providing methods to retrieve devices based on their configuration. It maintains a + /// collection of factory methods that are keyed by device type names, allowing for extensibility through plugins. This + /// class also handles metadata retrieval and secret management for device configurations. public class DeviceFactory { /// - /// Initializes a new instance of the DeviceFactory class and loads all device type factories + /// Initializes a new instance of the class and loads all available device factories + /// from the current assembly. /// + /// This constructor scans the executing assembly for types that implement the interface and are not abstract or interfaces. For each valid type, an instance is + /// created and passed to the LoadDeviceFactories method for further processing. If a type cannot be + /// instantiated, an informational log message is generated, and the process continues with the remaining + /// types. public DeviceFactory() { - var assy = Assembly.GetExecutingAssembly(); - PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); + var programAssemblies = Directory.GetFiles(InitialParametersClass.ProgramDirectory.ToString(), "*.dll"); - var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); - - if (types != null) + foreach (var assembly in programAssemblies) { + try + { + Assembly.LoadFrom(assembly); + } + catch (Exception e) + { + Debug.LogError("Unable to load assembly: {assemblyName} - {message}", assembly, e.Message); + } + } + + var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + + // Loop through all loaded assemblies that contain at least 1 type that implements IDeviceFactory + foreach (var assembly in loadedAssemblies) + { + Debug.LogDebug("loaded assembly: {assemblyName}", assembly.GetName().Name); + + PluginLoader.AddLoadedAssembly(assembly.GetName().Name, assembly); + + var types = assembly.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); + + if (types == null || !types.Any()) + { + Debug.LogDebug("No DeviceFactory types found in assembly: {assemblyName}", assembly.GetName().Name); + continue; + } + foreach (var type in types) { try { var factory = (IDeviceFactory)Activator.CreateInstance(type); - factory.LoadTypeFactories(); + LoadDeviceFactories(factory); } catch (Exception e) { - Debug.LogMessage(LogEventLevel.Information, "Unable to load type: '{1}' DeviceFactory: {0}", e, type.Name); + Debug.LogError("Unable to load type: '{message}' DeviceFactory: {type}", e.Message, type.Name); } } + } } - /// - /// A dictionary of factory methods, keyed by config types, added by plugins. - /// These methods are looked up and called by GetDevice in this class. - /// - static Dictionary FactoryMethods = + /// + /// Loads device factories from the specified plugin device factory and registers them for use. + /// + /// This method retrieves metadata from the provided , including + /// type names, descriptions, and configuration snippets, and registers the factory for each device type. The type + /// names are converted to lowercase for registration. + /// The plugin device factory that provides the device types, descriptions, and factory methods to be registered. + private static void LoadDeviceFactories(IDeviceFactory deviceFactory) + { + foreach (var typeName in deviceFactory.TypeNames) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + } + } + + /// + /// A dictionary of factory methods, keyed by config types, added by plugins. + /// These methods are looked up and called by GetDevice in this class. + /// + private static readonly Dictionary FactoryMethods = new Dictionary(StringComparer.OrdinalIgnoreCase); - /// - /// Adds a plugin factory method - /// - /// - /// - public static void AddFactoryForType(string typeName, Func method) - { - //Debug.LogMessage(LogEventLevel.Debug, "Adding factory method for type '{0}'", typeName); - DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method}); - } + /// + /// Registers a factory method for creating instances of a specific type. + /// + /// This method associates a type name with a factory method, allowing instances of the type to + /// be created dynamically. The factory method is stored internally and can be retrieved or invoked as + /// needed. + /// The name of the type for which the factory method is being registered. This value cannot be null or empty. + /// A delegate that defines the factory method. The delegate takes a parameter and + /// returns an instance of . + public static void AddFactoryForType(string typeName, Func method) + { + FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method }); + } + /// + /// Registers a factory method for creating instances of a specific device type. + /// + /// If a factory method for the specified already exists, the method + /// will not overwrite it and will log an informational message instead. + /// The unique name of the device type. This serves as the key for identifying the factory method. + /// A brief description of the device type. This is used for informational purposes. + /// The of the device being registered. This represents the runtime type of the device. + /// A factory method that takes a as input and returns an instance of . public static void AddFactoryForType(string typeName, string description, Type Type, Func method) { - //Debug.LogMessage(LogEventLevel.Debug, "Adding factory method for type '{0}'", typeName); - - if(FactoryMethods.ContainsKey(typeName)) + if (FactoryMethods.ContainsKey(typeName)) { - Debug.LogMessage(LogEventLevel.Information, "Unable to add type: '{0}'. Already exists in DeviceFactory", typeName); + Debug.LogInformation("Unable to add type: '{typeName}'. Already exists in DeviceFactory", typeName); return; } var wrapper = new DeviceFactoryWrapper() { Type = Type, Description = description, FactoryMethod = method }; - DeviceFactory.FactoryMethods.Add(typeName, wrapper); + + FactoryMethods.Add(typeName, wrapper); } private static void CheckForSecrets(IEnumerable obj) { foreach (var prop in obj.Where(prop => prop.Value as JObject != null)) { - if (prop.Name.ToLower() == "secret") + if (prop.Name.Equals("secret", StringComparison.CurrentCultureIgnoreCase)) { var secret = GetSecret(prop.Children().First().ToObject()); - //var secret = GetSecret(JsonConvert.DeserializeObject(prop.Children().First().ToString())); + prop.Parent.Replace(secret); } - var recurseProp = prop.Value as JObject; - if (recurseProp == null) return; + + if (!(prop.Value is JObject recurseProp)) return; + CheckForSecrets(recurseProp.Properties()); } } @@ -127,66 +166,70 @@ namespace PepperDash.Essentials.Core var secretProvider = SecretsManager.GetSecretProviderByKey(data.Provider); if (secretProvider == null) return null; var secret = secretProvider.GetSecret(data.Key); - if (secret != null) return (string) secret.Value; + if (secret != null) return (string)secret.Value; Debug.LogMessage(LogEventLevel.Debug, "Unable to retrieve secret {0}{1} - Make sure you've added it to the secrets provider", data.Provider, data.Key); - return String.Empty; + return string.Empty; } /// - /// The factory method for Core "things". Also iterates the Factory methods that have - /// been loaded from plugins - /// - /// - /// - /// - /// GetDevice method + /// Creates and returns a device instance based on the provided . /// + /// This method attempts to create a device using the type specified in the + /// parameter. If the type corresponds to a registered factory method, the device is created and returned. If the + /// type is unrecognized or an exception occurs, the method logs the error and returns . + /// The configuration object containing the key, name, type, and properties required to create the device. + /// An instance of a device that implements , or if the device type is + /// not recognized or an error occurs during creation. public static IKeyed GetDevice(DeviceConfig dc) { try { - Debug.LogMessage(LogEventLevel.Information, "Loading '{0}' from Essentials Core", dc.Type); - var localDc = new DeviceConfig(dc); var key = localDc.Key; var name = localDc.Name; var type = localDc.Type; var properties = localDc.Properties; - //var propRecurse = properties; var typeName = localDc.Type.ToLower(); - - var jObject = properties as JObject; - if (jObject != null) + if (properties is JObject jObject) { var jProp = jObject.Properties(); CheckForSecrets(jProp); } - Debug.LogMessage(LogEventLevel.Verbose, "typeName = {0}", typeName); - // Check for types that have been added by plugin dlls. - return !FactoryMethods.ContainsKey(typeName) ? null : FactoryMethods[typeName].FactoryMethod(localDc); + if (!FactoryMethods.TryGetValue(typeName, out var wrapper)) + { + Debug.LogWarning("Device type '{typeName}' not found in DeviceFactory", typeName); + return null; + } + + Debug.LogInformation("Loading '{type}' from {assemblyName}", typeName, wrapper.Type.Assembly.FullName); + + // Check for types that have been added by plugin dlls. + return wrapper.FactoryMethod(localDc); } catch (Exception ex) { - Debug.LogMessage(ex, "Exception occurred while creating device {0}: {1}", null, dc.Key, ex.Message); + Debug.LogError(ex, "Exception occurred while creating device {0}: {1}", null, dc.Key, ex.Message); return null; } } /// - /// Prints the type names and associated metadata from the FactoryMethods collection. - /// - /// - /// - /// GetDeviceFactoryTypes method + /// Displays a list of device factory types that match the specified filter. /// + /// The method outputs the filtered list of device factory types to the console, including their + /// key, type, and description. If a type is not specified by the plugin, it will be displayed as "Not Specified by + /// Plugin." + /// A string used to filter the device factory types by their keys. If the filter is null or empty, all device + /// factory types are displayed. public static void GetDeviceFactoryTypes(string filter) { var types = !string.IsNullOrEmpty(filter) @@ -212,16 +255,18 @@ namespace PepperDash.Essentials.Core } } - /// - /// Returns the device factory dictionary - /// - /// - /// - public static Dictionary GetDeviceFactoryDictionary(string filter) - { - return string.IsNullOrEmpty(filter) - ? FactoryMethods - : FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value); - } + /// + /// Retrieves a dictionary of device factory wrappers, optionally filtered by a specified string. + /// + /// A string used to filter the dictionary keys. Only entries with keys containing the specified filter will be + /// included. If or empty, all entries are returned. + /// A dictionary where the keys are strings representing device identifiers and the values are instances. The dictionary may be empty if no entries match the filter. + public static Dictionary GetDeviceFactoryDictionary(string filter) + { + return string.IsNullOrEmpty(filter) + ? FactoryMethods + : FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value); + } } -} \ No newline at end of file +} diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs new file mode 100644 index 00000000..dc1f72d9 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs @@ -0,0 +1,43 @@ + + +using System; +using PepperDash.Core; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core +{ + /// + /// Wraps a device factory, providing metadata and a factory method for creating devices. + /// + public class DeviceFactoryWrapper + { + /// + /// Gets or sets the type associated with the current instance. + /// + public Type Type { get; set; } + + /// + /// Gets or sets the description associated with the object. + /// + public string Description { get; set; } + + /// + /// Gets or sets the factory method used to create an instance based on the provided . + /// + /// The factory method allows customization of how instances are created for + /// specific inputs. Ensure the delegate is not null before invoking it. + public Func FactoryMethod { get; set; } + + /// + /// Initializes a new instance of the class with default values. + /// + /// The property is initialized to , and the property is set to "Not Available". + public DeviceFactoryWrapper() + { + Type = null; + Description = "Not Available"; + } + } +} diff --git a/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs index 31ff95d2..b267edf6 100644 --- a/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs @@ -1,4 +1,8 @@ -namespace PepperDash.Essentials.Core +using System; +using System.Collections.Generic; +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core { /// /// Defines the contract for IDeviceFactory @@ -6,8 +10,21 @@ public interface IDeviceFactory { /// - /// Loads all the types to the DeviceFactory + /// Gets the type of the factory associated with the current instance. /// - void LoadTypeFactories(); + Type FactoryType { get; } + + /// + /// Gets a list of type names associated with the current plugin. + /// + List TypeNames { get; } + + /// + /// Builds and returns an instance based on the provided configuration. + /// + /// The configuration settings used to initialize the device. This parameter cannot be null. + /// An instance configured according to the specified . + EssentialsDevice BuildDevice(DeviceConfig deviceConfig); } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs b/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs index ec823007..caad4b57 100644 --- a/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs @@ -1,5 +1,5 @@ +using System; using System.Collections.Generic; -using PepperDash.Core; namespace PepperDash.Essentials.Core @@ -16,8 +16,16 @@ namespace PepperDash.Essentials.Core } + /// + /// Defines a class that is capable of loading custom plugin device types for development purposes + /// + [Obsolete("This interface is obsolete and will be removed in a future version." + + " Use IPluginDeviceFactory instead and check Global.IsRunningDevelopmentVersion to determine if the Essentials framework is in development mode.")] public interface IPluginDevelopmentDeviceFactory : IPluginDeviceFactory { + /// + /// Gets a list of all the development versions of the Essentials framework that are supported by this factory. + /// List DevelopmentEssentialsFrameworkVersions { get; } } } diff --git a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs index a74ba16a..8978c752 100644 --- a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs +++ b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs @@ -1,15 +1,13 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; -using Crestron.SimplSharp; -// using Crestron.SimplSharp.CrestronIO; using System.Reflection; - +using Crestron.SimplSharp; +using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using Serilog.Events; -using Newtonsoft.Json; -using System.IO; namespace PepperDash.Essentials { @@ -28,10 +26,19 @@ namespace PepperDash.Essentials /// static List LoadedPluginFolderAssemblies; + /// + /// The assembly for the Essentials Framework + /// public static LoadedAssembly EssentialsAssembly { get; private set; } + /// + /// The assembly for the PepperDash Core + /// public static LoadedAssembly PepperDashCoreAssembly { get; private set; } + /// + /// The list of assemblies loaded from the Essentials plugins folder + /// public static List EssentialsPluginAssemblies { get; private set; } /// @@ -131,7 +138,7 @@ namespace PepperDash.Essentials /// /// Loads an assembly via Reflection and adds it to the list of loaded assemblies /// - /// + /// static LoadedAssembly LoadAssembly(string filePath) { try @@ -153,7 +160,8 @@ namespace PepperDash.Essentials } return null; - } catch(Exception ex) + } + catch (Exception ex) { Debug.LogMessage(ex, "Error loading assembly from {path}", null, filePath); return null; @@ -212,6 +220,20 @@ namespace PepperDash.Essentials } } + /// + /// Associates the specified assembly with the given name in the loaded assemblies collection. + /// + /// If an assembly with the specified name already exists in the loaded assemblies collection, + /// this method updates its associated assembly. If no matching name is found, the method does nothing. + /// The name used to identify the assembly. This value is case-sensitive and must not be null or empty. + /// The assembly to associate with the specified name. This value must not be null. + public static void AddLoadedAssembly(string name, Assembly assembly) + { + var loadedAssembly = LoadedAssemblies.FirstOrDefault(la => la.Name.Equals(name)); + + loadedAssembly?.SetAssembly(assembly); + } + /// /// Used by console command to report the currently loaded assemblies and versions /// @@ -402,7 +424,7 @@ namespace PepperDash.Essentials try { var assy = loadedAssembly.Assembly; - Type[] types = {}; + Type[] types = { }; try { types = assy.GetTypes(); @@ -419,8 +441,8 @@ namespace PepperDash.Essentials foreach (var type in types) { try - { - if (typeof (IPluginDeviceFactory).IsAssignableFrom(type) && !type.IsAbstract) + { + if (typeof(IPluginDeviceFactory).IsAssignableFrom(type) && !type.IsAbstract) { var plugin = (IPluginDeviceFactory)Activator.CreateInstance(type); @@ -454,37 +476,61 @@ namespace PepperDash.Essentials } /// - /// Loads a + /// Loads a custom plugin and performs a dependency check to ensure compatibility with the required Essentials + /// framework version. /// - /// - /// - static void LoadCustomPlugin(IPluginDeviceFactory plugin, LoadedAssembly loadedAssembly) + /// This method verifies that the plugin meets the minimum required Essentials framework version + /// before loading it. If the plugin fails the dependency check, it is skipped, and a log message is generated. If + /// the plugin passes the check, it is loaded, and its type factories are initialized. + /// The plugin to be loaded, implementing the interface. If the plugin also + /// implements , additional checks for development versions are + /// performed. + /// The assembly associated with the plugin being loaded. This is used for logging and tracking purposes. + static void LoadCustomPlugin(IPluginDeviceFactory pluginDeviceFactory, LoadedAssembly loadedAssembly) { - var developmentPlugin = plugin as IPluginDevelopmentDeviceFactory; - - var passed = developmentPlugin != null ? Global.IsRunningDevelopmentVersion - (developmentPlugin.DevelopmentEssentialsFrameworkVersions, developmentPlugin.MinimumEssentialsFrameworkVersion) - : Global.IsRunningMinimumVersionOrHigher(plugin.MinimumEssentialsFrameworkVersion); + var passed = pluginDeviceFactory is IPluginDevelopmentDeviceFactory developmentPlugin ? Global.IsRunningDevelopmentVersion + (developmentPlugin.DevelopmentEssentialsFrameworkVersions, developmentPlugin.MinimumEssentialsFrameworkVersion) + : Global.IsRunningMinimumVersionOrHigher(pluginDeviceFactory.MinimumEssentialsFrameworkVersion); if (!passed) { Debug.LogMessage(LogEventLevel.Information, "\r\n********************\r\n\tPlugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin {1}\r\n********************", - plugin.MinimumEssentialsFrameworkVersion, loadedAssembly.Name); + pluginDeviceFactory.MinimumEssentialsFrameworkVersion, loadedAssembly.Name); return; } else { - Debug.LogMessage(LogEventLevel.Information, "Passed plugin passed dependency check (required version {0})", plugin.MinimumEssentialsFrameworkVersion); + Debug.LogMessage(LogEventLevel.Information, "Passed plugin passed dependency check (required version {0})", pluginDeviceFactory.MinimumEssentialsFrameworkVersion); } - Debug.LogMessage(LogEventLevel.Information, "Loading plugin: {0}", loadedAssembly.Name); - plugin.LoadTypeFactories(); + Debug.LogMessage(LogEventLevel.Information, "Loading plugin factory: {0}", loadedAssembly.Name); - if(!EssentialsPluginAssemblies.Contains(loadedAssembly)) + LoadDeviceFactories(pluginDeviceFactory); + + if (!EssentialsPluginAssemblies.Contains(loadedAssembly)) EssentialsPluginAssemblies.Add(loadedAssembly); } + /// + /// Loads device factories from the specified plugin device factory and registers them for use. + /// + /// This method retrieves metadata from the provided , including + /// type names, descriptions, and configuration snippets, and registers the factory for each device type. The type + /// names are converted to lowercase for registration. + /// The plugin device factory that provides the device types, descriptions, and factory methods to be registered. + private static void LoadDeviceFactories(IPluginDeviceFactory deviceFactory) + { + foreach (var typeName in deviceFactory.TypeNames) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + } + } + /// /// Loads a a custom plugin via the legacy method /// @@ -567,13 +613,30 @@ namespace PepperDash.Essentials /// public class LoadedAssembly { + /// + /// Gets the name of the assembly + /// [JsonProperty("name")] public string Name { get; private set; } + + /// + /// Gets the version of the assembly + /// [JsonProperty("version")] public string Version { get; private set; } + + /// + /// Gets the assembly + /// [JsonIgnore] public Assembly Assembly { get; private set; } + /// + /// Initializes a new instance of the LoadedAssembly class + /// + /// The name of the assembly + /// The version of the assembly + /// The assembly public LoadedAssembly(string name, string version, Assembly assembly) { Name = name; diff --git a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs index 7656b277..a0fa0c9f 100644 --- a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs @@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Devices.Common { var assy = Assembly.GetExecutingAssembly(); PluginLoader.SetEssentialsAssembly(assy.GetName().Name, assy); - + var types = assy.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract); if (types != null) @@ -29,7 +29,7 @@ namespace PepperDash.Essentials.Devices.Common try { var factory = (IDeviceFactory)Activator.CreateInstance(type); - factory.LoadTypeFactories(); + LoadDeviceFactories(factory); } catch (Exception e) { @@ -38,5 +38,24 @@ namespace PepperDash.Essentials.Devices.Common } } } + + /// + /// Loads device factories from the specified plugin device factory and registers them for use. + /// + /// This method retrieves metadata from the provided , including + /// type names, descriptions, and configuration snippets, and registers the factory for each device type. The type + /// names are converted to lowercase for registration. + /// The plugin device factory that provides the device types, descriptions, and factory methods to be registered. + private static void LoadDeviceFactories(IDeviceFactory deviceFactory) + { + foreach (var typeName in deviceFactory.TypeNames) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + } + } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs index 7d4b0340..ce40aa64 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs @@ -1,8 +1,8 @@ -using PepperDash.Core; -using PepperDash.Essentials.Core; -using System; +using System; using System.Linq; using System.Reflection; +using PepperDash.Core; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials { @@ -30,7 +30,7 @@ namespace PepperDash.Essentials { var factory = (IDeviceFactory)Activator.CreateInstance(type); - factory.LoadTypeFactories(); + LoadDeviceFactories(factory); } catch (Exception ex) { @@ -38,5 +38,24 @@ namespace PepperDash.Essentials } } } + + /// + /// Loads device factories from the specified plugin device factory and registers them for use. + /// + /// This method retrieves metadata from the provided , including + /// type names, descriptions, and configuration snippets, and registers the factory for each device type. The type + /// names are converted to lowercase for registration. + /// The plugin device factory that provides the device types, descriptions, and factory methods to be registered. + private static void LoadDeviceFactories(IDeviceFactory deviceFactory) + { + foreach (var typeName in deviceFactory.TypeNames) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + } + } } } diff --git a/src/PepperDash.Essentials/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs index 56615017..3da56d8b 100644 --- a/src/PepperDash.Essentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -1,7 +1,9 @@  +using System; +using System.Linq; +using System.Reflection; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; -using System.Reflection; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.CrestronThread; using Crestron.SimplSharpPro.Diagnostics; @@ -9,12 +11,9 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; -using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Core.Web; -using System; -using System.Linq; -using Serilog.Events; using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Web; +using Serilog.Events; namespace PepperDash.Essentials { @@ -46,22 +45,22 @@ namespace PepperDash.Essentials // AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve; } - private System.Reflection.Assembly CurrentDomainOnAssemblyResolve(object sender, ResolveEventArgs args) + private Assembly CurrentDomainOnAssemblyResolve(object sender, ResolveEventArgs args) { - var assemblyName = new System.Reflection.AssemblyName(args.Name).Name; + var assemblyName = new AssemblyName(args.Name).Name; if (assemblyName == "PepperDash_Core") { - return System.Reflection.Assembly.LoadFrom("PepperDashCore.dll"); + return Assembly.LoadFrom("PepperDashCore.dll"); } if (assemblyName == "PepperDash_Essentials_Core") { - return System.Reflection.Assembly.LoadFrom("PepperDash.Essentials.Core.dll"); + return Assembly.LoadFrom("PepperDash.Essentials.Core.dll"); } if (assemblyName == "Essentials Devices Common") { - return System.Reflection.Assembly.LoadFrom("PepperDash.Essentials.Devices.Common.dll"); + return Assembly.LoadFrom("PepperDash.Essentials.Devices.Common.dll"); } return null; @@ -79,7 +78,7 @@ namespace PepperDash.Essentials if (preventInitializationComplete) { Debug.LogMessage(LogEventLevel.Debug, "******************* InitializeSystem() Entering **********************"); - + _startTimer = new CTimer(StartSystem, preventInitializationComplete, StartupTime); _initializeEvent = new CEvent(true, false); DeviceManager.AllDevicesRegistered += (o, a) => @@ -88,7 +87,7 @@ namespace PepperDash.Essentials }; _initializeEvent.Wait(30000); Debug.LogMessage(LogEventLevel.Debug, "******************* InitializeSystem() Exiting **********************"); - + SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; } else @@ -99,7 +98,7 @@ namespace PepperDash.Essentials private void StartSystem(object preventInitialization) { - Debug.SetErrorLogMinimumDebugLevel(Serilog.Events.LogEventLevel.Verbose); + Debug.SetErrorLogMinimumDebugLevel(LogEventLevel.Verbose); DeterminePlatform(); @@ -201,8 +200,8 @@ namespace PepperDash.Essentials { userFolder = "User"; nvramFolder = "Nvram"; - } - + } + Debug.LogMessage(LogEventLevel.Information, "Starting Essentials v{version:l} on {processorSeries:l} Appliance", Global.AssemblyVersion, is4series ? "4-series" : "3-series"); //Debug.LogMessage(LogEventLevel.Information, "Starting Essentials v{0} on {1} Appliance", Global.AssemblyVersion, is4series ? "4-series" : "3-series"); @@ -210,8 +209,8 @@ namespace PepperDash.Essentials if (Directory.Exists(Global.ApplicationDirectoryPathPrefix + dirSeparator + userFolder + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber))) { - - Debug.LogMessage(LogEventLevel.Information, "{userFolder:l}/program{applicationNumber} directory found", userFolder, InitialParametersClass.ApplicationNumber); + + Debug.LogMessage(LogEventLevel.Information, "{userFolder:l}/program{applicationNumber} directory found", userFolder, InitialParametersClass.ApplicationNumber); filePathPrefix = directoryPrefix + dirSeparator + userFolder + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; } @@ -220,7 +219,7 @@ namespace PepperDash.Essentials + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber))) { Debug.LogMessage(LogEventLevel.Information, "{nvramFolder:l}/program{applicationNumber} directory found", nvramFolder, InitialParametersClass.ApplicationNumber); - + filePathPrefix = directoryPrefix + dirSeparator + nvramFolder + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; } @@ -228,7 +227,7 @@ namespace PepperDash.Essentials else { Debug.LogMessage(LogEventLevel.Information, "{userFolder:l}/program{applicationNumber} directory found", userFolder, InitialParametersClass.ApplicationNumber); - + filePathPrefix = directoryPrefix + dirSeparator + userFolder + dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator; } @@ -236,7 +235,7 @@ namespace PepperDash.Essentials else // Handles Linux OS (Virtual Control) { //Debug.SetDebugLevel(2); - Debug.LogMessage(LogEventLevel.Information, "Starting Essentials v{version:l} on Virtual Control Server", Global.AssemblyVersion); + Debug.LogMessage(LogEventLevel.Information, "Starting Essentials v{version:l} on Virtual Control Server", Global.AssemblyVersion); // Set path to User/ filePathPrefix = directoryPrefix + dirSeparator + "User" + dirSeparator; @@ -246,7 +245,7 @@ namespace PepperDash.Essentials } catch (Exception e) { - Debug.LogMessage(e, "Unable to determine platform due to exception"); + Debug.LogMessage(e, "Unable to determine platform due to exception"); } } @@ -262,11 +261,11 @@ namespace PepperDash.Essentials PluginLoader.AddProgramAssemblies(); _ = new Core.DeviceFactory(); - _ = new Devices.Common.DeviceFactory(); - _ = new DeviceFactory(); + // _ = new Devices.Common.DeviceFactory(); + // _ = new DeviceFactory(); - _ = new ProcessorExtensionDeviceFactory(); - _ = new MobileControlFactory(); + // _ = new ProcessorExtensionDeviceFactory(); + // _ = new MobileControlFactory(); Debug.LogMessage(LogEventLevel.Information, "Starting Essentials load from configuration"); @@ -313,7 +312,7 @@ namespace PepperDash.Essentials } - + /// /// Verifies filesystem is set up. IR, SGD, and programX folders @@ -333,46 +332,46 @@ namespace PepperDash.Essentials Directory.Create(irDir); var sgdDir = Global.FilePathPrefix + "sgd"; - if (!Directory.Exists(sgdDir)) - Directory.Create(sgdDir); + if (!Directory.Exists(sgdDir)) + Directory.Create(sgdDir); var pluginDir = Global.FilePathPrefix + "plugins"; if (!Directory.Exists(pluginDir)) Directory.Create(pluginDir); var joinmapDir = Global.FilePathPrefix + "joinmaps"; - if(!Directory.Exists(joinmapDir)) + if (!Directory.Exists(joinmapDir)) Directory.Create(joinmapDir); - return configExists; - } + return configExists; + } - /// - /// TearDown method - /// - public void TearDown() - { - Debug.LogMessage(LogEventLevel.Information, "Tearing down existing system"); - DeviceManager.DeactivateAll(); + /// + /// TearDown method + /// + public void TearDown() + { + Debug.LogMessage(LogEventLevel.Information, "Tearing down existing system"); + DeviceManager.DeactivateAll(); - TieLineCollection.Default.Clear(); + TieLineCollection.Default.Clear(); - foreach (var key in DeviceManager.GetDevices()) - DeviceManager.RemoveDevice(key); + foreach (var key in DeviceManager.GetDevices()) + DeviceManager.RemoveDevice(key); - Debug.LogMessage(LogEventLevel.Information, "Tear down COMPLETE"); - } + Debug.LogMessage(LogEventLevel.Information, "Tear down COMPLETE"); + } - /// - /// - /// - void Load() - { - LoadDevices(); - LoadRooms(); - LoadLogoServer(); + /// + /// + /// + void Load() + { + LoadDevices(); + LoadRooms(); + LoadLogoServer(); - DeviceManager.ActivateAll(); + DeviceManager.ActivateAll(); LoadTieLines(); @@ -381,8 +380,8 @@ namespace PepperDash.Essentials if (mobileControl == null) return; mobileControl.LinkSystemMonitorToAppServer();*/ - - } + + } /// /// LoadDevices method @@ -414,8 +413,8 @@ namespace PepperDash.Essentials { var prompt = Global.ControlSystem.ControllerPrompt; - var typeMatch = String.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) || - String.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase); + var typeMatch = string.Equals(devConf.Type, prompt, StringComparison.OrdinalIgnoreCase) || + string.Equals(devConf.Type, prompt.Replace("-", ""), StringComparison.OrdinalIgnoreCase); if (!typeMatch) Debug.LogMessage(LogEventLevel.Information, @@ -430,14 +429,14 @@ namespace PepperDash.Essentials if (newDev == null) newDev = Core.DeviceFactory.GetDevice(devConf); - if (newDev != null) - DeviceManager.AddDevice(newDev); - else + if (newDev != null) + DeviceManager.AddDevice(newDev); + else Debug.LogMessage(LogEventLevel.Information, "ERROR: Cannot load unknown device type '{deviceType:l}', key '{deviceKey:l}'.", devConf.Type, devConf.Key); } catch (Exception e) { - Debug.LogMessage(e, "ERROR: Creating device {deviceKey:l}. Skipping device.",args: new[] { devConf.Key }); + Debug.LogMessage(e, "ERROR: Creating device {deviceKey:l}. Skipping device.", args: new[] { devConf.Key }); } } Debug.LogMessage(LogEventLevel.Information, "All Devices Loaded."); @@ -475,27 +474,28 @@ namespace PepperDash.Essentials /// LoadRooms method /// public void LoadRooms() - { + { if (ConfigReader.ConfigObject.Rooms == null) { Debug.LogMessage(LogEventLevel.Information, "Notice: Configuration contains no rooms - Is this intentional? This may be a valid configuration."); return; } - foreach (var roomConfig in ConfigReader.ConfigObject.Rooms) + foreach (var roomConfig in ConfigReader.ConfigObject.Rooms) { try { var room = Core.DeviceFactory.GetDevice(roomConfig); - if(room == null) + if (room == null) { Debug.LogWarning("ERROR: Cannot load unknown room type '{roomType:l}', key '{roomKey:l}'.", roomConfig.Type, roomConfig.Key); continue; } DeviceManager.AddDevice(room); - } catch (Exception ex) + } + catch (Exception ex) { Debug.LogMessage(ex, "Exception loading room {roomKey}:{roomType}", null, roomConfig.Key, roomConfig.Type); continue; @@ -564,7 +564,7 @@ namespace PepperDash.Essentials } catch { - Debug.LogMessage(LogEventLevel.Information, "Unable to find logo information in any room config"); + Debug.LogMessage(LogEventLevel.Information, "Unable to find logo information in any room config"); return false; } } diff --git a/src/PepperDash.Essentials/Factory/DeviceFactory.cs b/src/PepperDash.Essentials/Factory/DeviceFactory.cs index 7a2df7d1..092a67a2 100644 --- a/src/PepperDash.Essentials/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials/Factory/DeviceFactory.cs @@ -3,11 +3,10 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharpPro; -using System.Reflection; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PepperDash.Core; @@ -39,14 +38,33 @@ namespace PepperDash.Essentials try { var factory = (IDeviceFactory)Activator.CreateInstance(type); - factory.LoadTypeFactories(); + LoadDeviceFactories(factory); } catch (Exception e) { - Debug.LogMessage(Serilog.Events.LogEventLevel.Error, "Unable to load type: '{exception}' DeviceFactory: {factoryName}", e, type.Name); + Debug.LogMessage(Serilog.Events.LogEventLevel.Error, "Unable to load type: '{exception}' DeviceFactory: {factoryName}", e, type.Name); } } } } + + /// + /// Loads device factories from the specified plugin device factory and registers them for use. + /// + /// This method retrieves metadata from the provided , including + /// type names, descriptions, and configuration snippets, and registers the factory for each device type. The type + /// names are converted to lowercase for registration. + /// The plugin device factory that provides the device types, descriptions, and factory methods to be registered. + private static void LoadDeviceFactories(IDeviceFactory deviceFactory) + { + foreach (var typeName in deviceFactory.TypeNames) + { + //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; + string description = descriptionAttribute[0].Description; + var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + } + } } } From 43989b9588e013e15e0c36e2fcb586d23e4f17cb Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:12:09 -0500 Subject: [PATCH 32/42] chore: move interfaces to their own files --- .../Devices/FIND HOMES Interfaces.cs | 35 ------------------- .../Devices/IAttachVideoStatus.cs | 13 +++++++ .../Devices/IDisplayUsage.cs | 10 ++++++ .../Devices/IMakeModel.cs | 22 ++++++++++++ .../Devices/IOnline.cs | 13 +++++++ 5 files changed, 58 insertions(+), 35 deletions(-) delete mode 100644 src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/IMakeModel.cs create mode 100644 src/PepperDash.Essentials.Core/Devices/IOnline.cs diff --git a/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs b/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs deleted file mode 100644 index 44b36134..00000000 --- a/src/PepperDash.Essentials.Core/Devices/FIND HOMES Interfaces.cs +++ /dev/null @@ -1,35 +0,0 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core -{ - /// - /// Defines the contract for IOnline - /// - public interface IOnline - { - BoolFeedback IsOnline { get; } - } - - /// - /// Defines the contract for IAttachVideoStatus - /// - public interface IAttachVideoStatus : IKeyed - { - // Extension methods will depend on this - } - - /// - /// For display classes that can provide usage data - /// - public interface IDisplayUsage - { - IntFeedback LampHours { get; } - } - - public interface IMakeModel : IKeyed - { - string DeviceMake { get; } - string DeviceModel { get; } - } -} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs new file mode 100644 index 00000000..4b9b36ca --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs @@ -0,0 +1,13 @@ +using PepperDash.Core; + + +namespace PepperDash.Essentials.Core +{ + /// + /// Defines the contract for IAttachVideoStatus + /// + public interface IAttachVideoStatus : IKeyed + { + // Extension methods will depend on this + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs b/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs new file mode 100644 index 00000000..0d74d819 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs @@ -0,0 +1,10 @@ +namespace PepperDash.Essentials.Core +{ + /// + /// For display classes that can provide usage data + /// + public interface IDisplayUsage + { + IntFeedback LampHours { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs b/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs new file mode 100644 index 00000000..494c9af3 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs @@ -0,0 +1,22 @@ +using PepperDash.Core; + + +namespace PepperDash.Essentials.Core +{ + + /// + /// Defines the contract for device make and model information + /// + public interface IMakeModel : IKeyed + { + /// + /// Gets the make of the device + /// + string DeviceMake { get; } + + /// + /// Gets the model of the device + /// + string DeviceModel { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/IOnline.cs b/src/PepperDash.Essentials.Core/Devices/IOnline.cs new file mode 100644 index 00000000..8c86a480 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Devices/IOnline.cs @@ -0,0 +1,13 @@ +namespace PepperDash.Essentials.Core +{ + /// + /// Defines the contract for IOnline + /// + public interface IOnline + { + /// + /// Gets a value indicating whether the device is online. + /// + BoolFeedback IsOnline { get; } + } +} \ No newline at end of file From 31143f56df2fdcfb51dd1dfcb1aabea2f45d1016 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:13:42 -0500 Subject: [PATCH 33/42] fix: modify how exceptions are printed to reduce noise When an exception occurs during the connect method, only the exception message will be printed at the Error log level. The entire stack trace will be printed when at the Verbose level. fixes #1273 --- src/PepperDash.Core/Comm/GenericSshClient.cs | 311 +++++++++---------- 1 file changed, 154 insertions(+), 157 deletions(-) diff --git a/src/PepperDash.Core/Comm/GenericSshClient.cs b/src/PepperDash.Core/Comm/GenericSshClient.cs index 3ba9059e..13192ed5 100644 --- a/src/PepperDash.Core/Comm/GenericSshClient.cs +++ b/src/PepperDash.Core/Comm/GenericSshClient.cs @@ -146,31 +146,31 @@ namespace PepperDash.Core base(key) { StreamDebugging = new CommunicationStreamDebugging(key); - CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); - Key = key; - Hostname = hostname; - Port = port; - Username = username; - Password = password; - AutoReconnectIntervalMs = 5000; + CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); + Key = key; + Hostname = hostname; + Port = port; + Username = username; + Password = password; + AutoReconnectIntervalMs = 5000; ReconnectTimer = new CTimer(o => - { + { if (ConnectEnabled) { Connect(); } - }, System.Threading.Timeout.Infinite); - } + }, System.Threading.Timeout.Infinite); + } - /// - /// S+ Constructor - Must set all properties before calling Connect - /// - public GenericSshClient() - : base(SPlusKey) - { - CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); - AutoReconnectIntervalMs = 5000; + /// + /// S+ Constructor - Must set all properties before calling Connect + /// + public GenericSshClient() + : base(SPlusKey) + { + CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); + AutoReconnectIntervalMs = 5000; ReconnectTimer = new CTimer(o => { @@ -179,18 +179,18 @@ namespace PepperDash.Core Connect(); } }, System.Threading.Timeout.Infinite); - } + } - /// - /// Handles closing this up when the program shuts down - /// - void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) - { - if (programEventType == eProgramStatusEventType.Stopping) - { - if (Client != null) - { - this.LogDebug("Program stopping. Closing connection"); + /// + /// Handles closing this up when the program shuts down + /// + void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType) + { + if (programEventType == eProgramStatusEventType.Stopping) + { + if (Client != null) + { + this.LogDebug("Program stopping. Closing connection"); Disconnect(); } } @@ -223,10 +223,7 @@ namespace PepperDash.Core this.LogDebug("Attempting connect"); // Cancel reconnect if running. - if (ReconnectTimer != null) - { - ReconnectTimer.Stop(); - } + ReconnectTimer?.Stop(); // Cleanup the old client if it already exists if (Client != null) @@ -268,20 +265,26 @@ namespace PepperDash.Core if (ie is SocketException) { - this.LogException(ie, "CONNECTION failure: Cannot reach host"); + this.LogError("CONNECTION failure: Cannot reach host"); + this.LogVerbose(ie, "Exception details: "); } if (ie is System.Net.Sockets.SocketException socketException) { - this.LogException(ie, "Connection failure: Cannot reach {host} on {port}", + this.LogError("Connection failure: Cannot reach {host} on {port}", Hostname, Port); + this.LogVerbose(socketException, "SocketException details: "); } if (ie is SshAuthenticationException) { - this.LogException(ie, "Authentication failure for username {userName}", Username); + this.LogError("Authentication failure for username {userName}", Username); + this.LogVerbose(ie, "AuthenticationException details: "); } else - this.LogException(ie, "Error on connect"); + { + this.LogError("Error on connect: {error}", ie.Message); + this.LogVerbose(ie, "Exception details: "); + } DisconnectLogged = true; KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED); @@ -291,7 +294,7 @@ namespace PepperDash.Core ReconnectTimer.Reset(AutoReconnectIntervalMs); } } - catch(SshOperationTimeoutException ex) + catch (SshOperationTimeoutException ex) { this.LogWarning("Connection attempt timed out: {message}", ex.Message); @@ -306,7 +309,8 @@ namespace PepperDash.Core catch (Exception e) { var errorLogLevel = DisconnectLogged == true ? Debug.ErrorLogLevel.None : Debug.ErrorLogLevel.Error; - this.LogException(e, "Unhandled exception on connect"); + this.LogError("Unhandled exception on connect: {error}", e.Message); + this.LogVerbose(e, "Exception details: "); DisconnectLogged = true; KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED); if (AutoReconnect) @@ -323,18 +327,18 @@ namespace PepperDash.Core } } - /// - /// Disconnect method - /// - public void Disconnect() - { - ConnectEnabled = false; - // Stop trying reconnects, if we are - if (ReconnectTimer != null) - { - ReconnectTimer.Stop(); - // ReconnectTimer = null; - } + /// + /// Disconnect method + /// + public void Disconnect() + { + ConnectEnabled = false; + // Stop trying reconnects, if we are + if (ReconnectTimer != null) + { + ReconnectTimer.Stop(); + // ReconnectTimer = null; + } KillClient(SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY); } @@ -360,7 +364,7 @@ namespace PepperDash.Core } catch (Exception ex) { - this.LogException(ex,"Exception in Kill Client"); + this.LogException(ex, "Exception in Kill Client"); } } @@ -368,7 +372,7 @@ namespace PepperDash.Core /// Kills the stream /// void KillStream() - { + { try { if (TheStream != null) @@ -384,59 +388,59 @@ namespace PepperDash.Core { this.LogException(ex, "Exception in Kill Stream:{0}"); } - } + } - /// - /// Handles the keyboard interactive authentication, should it be required. - /// - void kauth_AuthenticationPrompt(object sender, AuthenticationPromptEventArgs e) - { - foreach (AuthenticationPrompt prompt in e.Prompts) - if (prompt.Request.IndexOf("Password:", StringComparison.InvariantCultureIgnoreCase) != -1) - prompt.Response = Password; - } - - /// - /// Handler for data receive on ShellStream. Passes data across to queue for line parsing. - /// - void Stream_DataReceived(object sender, ShellDataEventArgs e) - { + /// + /// Handles the keyboard interactive authentication, should it be required. + /// + void kauth_AuthenticationPrompt(object sender, AuthenticationPromptEventArgs e) + { + foreach (AuthenticationPrompt prompt in e.Prompts) + if (prompt.Request.IndexOf("Password:", StringComparison.InvariantCultureIgnoreCase) != -1) + prompt.Response = Password; + } + + /// + /// Handler for data receive on ShellStream. Passes data across to queue for line parsing. + /// + void Stream_DataReceived(object sender, ShellDataEventArgs e) + { if (((ShellStream)sender).Length <= 0L) { return; } - var response = ((ShellStream)sender).Read(); - - var bytesHandler = BytesReceived; - - if (bytesHandler != null) - { + var response = ((ShellStream)sender).Read(); + + var bytesHandler = BytesReceived; + + if (bytesHandler != null) + { var bytes = Encoding.UTF8.GetBytes(response); - if (StreamDebugging.RxStreamDebuggingIsEnabled) - { - this.LogInformation("Received {1} bytes: '{0}'", ComTextHelper.GetEscapedText(bytes), bytes.Length); - } + if (StreamDebugging.RxStreamDebuggingIsEnabled) + { + this.LogInformation("Received {1} bytes: '{0}'", ComTextHelper.GetEscapedText(bytes), bytes.Length); + } bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes)); - } - - var textHandler = TextReceived; - if (textHandler != null) - { + } + + var textHandler = TextReceived; + if (textHandler != null) + { if (StreamDebugging.RxStreamDebuggingIsEnabled) this.LogInformation("Received: '{0}'", ComTextHelper.GetDebugText(response)); textHandler(this, new GenericCommMethodReceiveTextArgs(response)); } - - } + + } - /// - /// Error event handler for client events - disconnect, etc. Will forward those events via ConnectionChange - /// event - /// - void Client_ErrorOccurred(object sender, ExceptionEventArgs e) - { + /// + /// Error event handler for client events - disconnect, etc. Will forward those events via ConnectionChange + /// event + /// + void Client_ErrorOccurred(object sender, ExceptionEventArgs e) + { CrestronInvoke.BeginInvoke(o => { if (e.Exception is SshConnectionException || e.Exception is System.Net.Sockets.SocketException) @@ -465,61 +469,54 @@ namespace PepperDash.Core /// void OnConnectionChange() { - if (ConnectionChange != null) - ConnectionChange(this, new GenericSocketStatusChageEventArgs(this)); + ConnectionChange?.Invoke(this, new GenericSocketStatusChageEventArgs(this)); } #region IBasicCommunication Members - /// - /// Sends text to the server - /// - /// - /// - /// SendText method - /// - public void SendText(string text) - { - try - { - if (Client != null && TheStream != null && IsConnected) - { - if (StreamDebugging.TxStreamDebuggingIsEnabled) - this.LogInformation( - "Sending {length} characters of text: '{text}'", - text.Length, - ComTextHelper.GetDebugText(text)); - - TheStream.Write(text); - TheStream.Flush(); - } - else - { - this.LogDebug("Client is null or disconnected. Cannot Send Text"); - } - } - catch (ObjectDisposedException) + /// + /// Sends text to the server + /// + /// The text to send + public void SendText(string text) + { + try { - this.LogError("ObjectDisposedException sending '{message}'. Restarting connection...", text.Trim()); + if (Client != null && TheStream != null && IsConnected) + { + if (StreamDebugging.TxStreamDebuggingIsEnabled) + this.LogInformation( + "Sending {length} characters of text: '{text}'", + text.Length, + ComTextHelper.GetDebugText(text)); + + TheStream.Write(text); + TheStream.Flush(); + } + else + { + this.LogDebug("Client is null or disconnected. Cannot Send Text"); + } + } + catch (ObjectDisposedException) + { + this.LogError("ObjectDisposedException sending '{message}'. Restarting connection...", text.Trim()); KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED); ReconnectTimer.Reset(); - } - catch (Exception ex) - { + } + catch (Exception ex) + { this.LogException(ex, "Exception sending text: '{message}'", text); - } - } + } + } /// /// Sends Bytes to the server /// - /// - /// - /// SendBytes method - /// - public void SendBytes(byte[] bytes) - { + /// The bytes to send + public void SendBytes(byte[] bytes) + { try { if (Client != null && TheStream != null && IsConnected) @@ -545,38 +542,38 @@ namespace PepperDash.Core catch (Exception ex) { this.LogException(ex, "Exception sending {message}", ComTextHelper.GetEscapedText(bytes)); - } - } - #endregion + } + } + #endregion -} + } -//***************************************************************************************************** -//***************************************************************************************************** -/// -/// Represents a SshConnectionChangeEventArgs -/// -public class SshConnectionChangeEventArgs : EventArgs - { + //***************************************************************************************************** + //***************************************************************************************************** + /// + /// Represents a SshConnectionChangeEventArgs + /// + public class SshConnectionChangeEventArgs : EventArgs + { /// /// Connection State /// public bool IsConnected { get; private set; } - /// - /// Gets or sets the UIsConnected - /// - public ushort UIsConnected { get { return (ushort)(Client.IsConnected ? 1 : 0); } } + /// + /// Gets or sets the UIsConnected + /// + public ushort UIsConnected { get { return (ushort)(Client.IsConnected ? 1 : 0); } } - /// - /// Gets or sets the Client - /// - public GenericSshClient Client { get; private set; } + /// + /// Gets or sets the Client + /// + public GenericSshClient Client { get; private set; } - /// - /// Gets or sets the Status - /// - public ushort Status { get { return Client.UStatus; } } + /// + /// Gets or sets the Status + /// + public ushort Status { get { return Client.UStatus; } } /// /// S+ Constructor From f0af9f8d19bc467f6a49785f0bc251f7a31c44c0 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:14:45 -0500 Subject: [PATCH 34/42] fix: mark IHasMultipleDisplays and associated enum as obsolete Fixes #1219 --- .../Devices/SourceListItem.cs | 4 +++- src/PepperDash.Essentials.Core/Room/Interfaces.cs | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs index d4fac061..d171b3d9 100644 --- a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using PepperDash.Core; @@ -248,6 +249,7 @@ namespace PepperDash.Essentials.Core /// /// Defines the valid destination types for SourceListItems in a room /// + [Obsolete] public enum eSourceListItemDestinationTypes { /// diff --git a/src/PepperDash.Essentials.Core/Room/Interfaces.cs b/src/PepperDash.Essentials.Core/Room/Interfaces.cs index 00fa0b7c..bffb80a3 100644 --- a/src/PepperDash.Essentials.Core/Room/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Room/Interfaces.cs @@ -1,8 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; using PepperDash.Core; @@ -28,6 +25,7 @@ namespace PepperDash.Essentials.Core /// /// For rooms with multiple displays /// + [Obsolete("Will be removed in a future version")] public interface IHasMultipleDisplays { Dictionary Displays { get; } @@ -40,7 +38,7 @@ namespace PepperDash.Essentials.Core { void RunRouteAction(string routeKey, string sourceListKey); - void RunRouteAction(string routeKey, string sourceListKey, Action successCallback); + void RunRouteAction(string routeKey, string sourceListKey, Action successCallback); } /// @@ -50,7 +48,7 @@ namespace PepperDash.Essentials.Core { void RunDirectRoute(string sourceKey, string destinationKey, eRoutingSignalType type = eRoutingSignalType.AudioVideo); } - + /// /// Describes a room with matrix routing /// @@ -139,7 +137,7 @@ namespace PepperDash.Essentials.Core bool HasEnvironmentalControlDevices { get; } } - public interface IRoomOccupancy:IKeyed + public interface IRoomOccupancy : IKeyed { IOccupancyStatusProvider RoomOccupancy { get; } bool OccupancyStatusProviderIsRemote { get; } From dc7f99e176b6b3dda777cafbaed3fbfc7c8d819c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:18:22 -0500 Subject: [PATCH 35/42] fix: mark FeedbackBase default constructor as obsolete There are situations now where feedbacks in the feedback collection can be used to update things on UIs. If the feedback doesn't have a key, it can't be used for this purpose. --- .../Feedbacks/BoolFeedback.cs | 1 + .../Feedbacks/FeedbackBase.cs | 101 ++++++++++-------- .../Feedbacks/SerialFeedback.cs | 3 +- .../Feedbacks/StringFeedback.cs | 1 + 4 files changed, 59 insertions(+), 47 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs index bc4cfde5..eb3abbb4 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs @@ -42,6 +42,7 @@ namespace PepperDash.Essentials.Core /// it will NOT reflect an actual value from a device until has been called /// /// Delegate to invoke when this feedback needs to be updated + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public BoolFeedback(Func valueFunc) : this(null, valueFunc) { diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs index d4caa7e5..723d22a6 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs @@ -9,45 +9,54 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { - public abstract class Feedback : IKeyed - { - public event EventHandler OutputChange; + /// + /// Base class for all feedback types + /// + public abstract class Feedback : IKeyed + { + /// + /// Occurs when the output value changes + /// + 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 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 ""; } } - /// - /// Gets or sets the InTestMode - /// - public bool InTestMode { get; protected set; } + /// + /// Gets or sets the InTestMode + /// + public bool InTestMode { get; protected set; } - /// - /// Base Constructor - empty - /// - protected Feedback() - { - } + /// + /// Base Constructor - empty + /// + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] + protected Feedback() : this(null) { } + /// + /// Constructor with Key parameter + /// + /// The key for the feedback protected Feedback(string key) { if (key == null) @@ -58,27 +67,27 @@ namespace PepperDash.Essentials.Core - /// - /// ClearTestValue method - /// - public void ClearTestValue() - { - InTestMode = false; - FireUpdate(); - } + /// + /// ClearTestValue method + /// + public void ClearTestValue() + { + InTestMode = false; + FireUpdate(); + } - /// - /// Fires an update synchronously - /// - public abstract void FireUpdate(); + /// + /// Fires an update synchronously + /// + public abstract void FireUpdate(); - /// - /// Fires the update asynchronously within a CrestronInvoke - /// - public void InvokeFireUpdate() - { - CrestronInvoke.BeginInvoke(o => FireUpdate()); - } + /// + /// Fires the update asynchronously within a CrestronInvoke + /// + public void InvokeFireUpdate() + { + CrestronInvoke.BeginInvoke(o => FireUpdate()); + } /// /// Helper method that fires event. Use this intstead of calling OutputChange @@ -103,5 +112,5 @@ namespace PepperDash.Essentials.Core { if (OutputChange != null) OutputChange(this, new FeedbackEventArgs(value)); } - } + } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs index 0daec8c1..b26e23e6 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs @@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Core /// public class SerialFeedback : Feedback { - public override string SerialValue { get { return _SerialValue; } } + public override string SerialValue { get { return _SerialValue; } } string _SerialValue; //public override eCueType Type { get { return eCueType.Serial; } } @@ -25,6 +25,7 @@ namespace PepperDash.Essentials.Core List LinkedInputSigs = new List(); + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public SerialFeedback() { } diff --git a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs index fe6d6884..f7d594c4 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs @@ -38,6 +38,7 @@ namespace PepperDash.Essentials.Core /// it will NOT reflect an actual value from a device until has been called /// /// Delegate to invoke when this feedback needs to be updated + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public StringFeedback(Func valueFunc) : this(null, valueFunc) { From 226014fee04f314e5c1fc8ec5d4fe86f673efeb5 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:27:33 -0500 Subject: [PATCH 36/42] fix: apply suggestions from code review - remove commented out debug statements - null check for description attribute Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs | 6 ++++-- src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs | 4 +++- .../MobileControlFactory.cs | 4 +++- src/PepperDash.Essentials/Factory/DeviceFactory.cs | 6 ++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs index 8978c752..b77d279b 100644 --- a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs +++ b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs @@ -523,9 +523,11 @@ namespace PepperDash.Essentials { foreach (var typeName in deviceFactory.TypeNames) { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; + string description = descriptionAttribute != null && descriptionAttribute.Length > 0 + ? descriptionAttribute[0].Description + : "No description available"; var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } diff --git a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs index a0fa0c9f..ff730706 100644 --- a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs @@ -52,7 +52,9 @@ namespace PepperDash.Essentials.Devices.Common { //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; + string description = (descriptionAttribute != null && descriptionAttribute.Length > 0) + ? descriptionAttribute[0].Description + : "No description available"; var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs index ce40aa64..32a00b8c 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs @@ -52,7 +52,9 @@ namespace PepperDash.Essentials { //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; + string description = (descriptionAttribute != null && descriptionAttribute.Length > 0) + ? descriptionAttribute[0].Description + : string.Empty; // Default value if no DescriptionAttribute is found var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } diff --git a/src/PepperDash.Essentials/Factory/DeviceFactory.cs b/src/PepperDash.Essentials/Factory/DeviceFactory.cs index 092a67a2..e59628ab 100644 --- a/src/PepperDash.Essentials/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials/Factory/DeviceFactory.cs @@ -59,9 +59,11 @@ namespace PepperDash.Essentials { foreach (var typeName in deviceFactory.TypeNames) { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; + string description = (descriptionAttribute != null && descriptionAttribute.Length > 0) + ? descriptionAttribute[0].Description + : "No description available"; var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } From 08cc84a8e882ff2d186132e258f89b8e6b92c087 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:28:53 -0500 Subject: [PATCH 37/42] fix: apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Devices/ProcessorExtensionDeviceFactory.cs | 4 +++- src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs index 469d18ec..c8528c4a 100644 --- a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs @@ -21,7 +21,9 @@ namespace PepperDash.Essentials.Core { //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; + string description = descriptionAttribute != null && descriptionAttribute.Length > 0 + ? descriptionAttribute[0].Description + : throw new InvalidOperationException($"No DescriptionAttribute found for type {typeof(T).FullName}"); var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; ProcessorExtensionDeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); } diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index 08aa67cf..9f644b04 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -92,9 +92,11 @@ namespace PepperDash.Essentials.Core { foreach (var typeName in deviceFactory.TypeNames) { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); + var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute[0].Description; + string description = descriptionAttribute != null && descriptionAttribute.Length > 0 + ? descriptionAttribute[0].Description + : "No description available"; var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } From 58bcc3315d70dfdac9cc06f4389d9aec3825c0dc Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:51:04 -0500 Subject: [PATCH 38/42] fix: add changes from code review --- Crestron-Library-Usage-Analysis.md | 282 ++++++++++++++++++ .../ProcessorExtensionDeviceFactory.cs | 7 +- .../Feedbacks/IntFeedback.cs | 1 + 3 files changed, 286 insertions(+), 4 deletions(-) create mode 100644 Crestron-Library-Usage-Analysis.md diff --git a/Crestron-Library-Usage-Analysis.md b/Crestron-Library-Usage-Analysis.md new file mode 100644 index 00000000..e295d0db --- /dev/null +++ b/Crestron-Library-Usage-Analysis.md @@ -0,0 +1,282 @@ +# Crestron Library Usage Analysis - PepperDash Essentials + +This document provides a comprehensive analysis of Crestron classes and interfaces used throughout the PepperDash Essentials framework, organized by namespace and library component. + +## Executive Summary + +The PepperDash Essentials framework extensively leverages Crestron SDK components across 100+ files, providing abstractions for: +- Control system hardware (processors, touchpanels, IO devices) +- Communication interfaces (Serial, TCP/IP, SSH, CEC, IR) +- Device management and routing +- User interface components and smart objects +- System monitoring and diagnostics + +## 1. Core Crestron Libraries + +### 1.1 Crestron.SimplSharp + +**Primary Usage**: Foundational framework components, collections, and basic types. + +**Key Files**: +- Multiple files across all projects use `Crestron.SimplSharp` namespaces +- Provides basic C# runtime support for Crestron processors + +### 1.2 Crestron.SimplSharpPro + +**Primary Usage**: Main hardware abstraction layer for Crestron devices. + +**Key Classes Used**: + +#### CrestronControlSystem +- **File**: `/src/PepperDash.Essentials/ControlSystem.cs` +- **Usage**: Base class for the main control system implementation +- **Implementation**: `public class ControlSystem : CrestronControlSystem, ILoadConfig` + +#### Device (Base Class) +- **Files**: 50+ files inherit from or use this class +- **Key Implementations**: + - `/src/PepperDash.Core/Device.cs` - Core device abstraction + - `/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs` - Extended device base + - `/src/PepperDash.Essentials.Core/Room/Room.cs` - Room device implementation + - `/src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs` - Processor device wrapper + +#### BasicTriList +- **Files**: 30+ files use this class extensively +- **Primary Usage**: Touchpanel communication and SIMPL bridging +- **Key Files**: + - `/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs` - Extension methods for signal handling + - `/src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs` - Bridge interface + - `/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs` - UI dialog implementation + +#### BasicTriListWithSmartObject +- **Files**: Multiple touchpanel and UI files +- **Usage**: Enhanced touchpanel support with smart object integration +- **Key Files**: + - `/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs` - Interface definitions + - `/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferenceList/SubpageReferenceList.cs` + +## 2. Communication Hardware + +### 2.1 Serial Communication (ComPort) + +**Primary Class**: `ComPort` +**Key Files**: +- `/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs` +- `/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs` + +**Usage Pattern**: +```csharp +public class ComPortController : Device, IBasicCommunicationWithStreamDebugging +public static ComPort GetComPort(EssentialsControlPropertiesConfig config) +``` + +**Interface Support**: `IComPorts` - Used for devices that provide multiple COM ports + +### 2.2 IR Communication (IROutputPort) + +**Primary Class**: `IROutputPort` +**Key Files**: +- `/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs` +- `/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs` +- `/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs` + +**Usage Pattern**: +```csharp +public class IrOutputPortController : Device +IROutputPort IrPort; +public IrOutputPortController(string key, IROutputPort port, string irDriverFilepath) +``` + +### 2.3 CEC Communication (ICec) + +**Primary Interface**: `ICec` +**Key Files**: +- `/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs` +- `/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs` + +**Usage Pattern**: +```csharp +public class CecPortController : Device, IBasicCommunicationWithStreamDebugging +public static ICec GetCecPort(ControlPropertiesConfig config) +``` + +## 3. Input/Output Hardware + +### 3.1 Digital Input + +**Primary Interface**: `IDigitalInput` +**Key Files**: +- `/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs` +- `/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs` + +**Usage Pattern**: +```csharp +public List Inputs { get; private set; } +void AddInput(IDigitalInput input) +``` + +### 3.2 Versiport Support + +**Key Files**: +- `/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs` +- `/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs` +- `/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs` + +**Usage**: Provides flexible I/O port configuration for various signal types + +## 4. Touchpanel Hardware + +### 4.1 MPC3 Touchpanel + +**Primary Class**: `MPC3Basic` +**Key File**: `/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs` + +**Usage Pattern**: +```csharp +public class Mpc3TouchpanelController : Device +readonly MPC3Basic _touchpanel; +_touchpanel = processor.ControllerTouchScreenSlotDevice as MPC3Basic; +``` + +### 4.2 TSW Series Support + +**Evidence**: References found in messenger files and mobile control components +**Usage**: Integrated through mobile control messaging system for TSW touchpanel features + +## 5. Timer and Threading + +### 5.1 CTimer + +**Primary Class**: `CTimer` +**Key File**: `/src/PepperDash.Core/PasswordManagement/PasswordManager.cs` + +**Usage Pattern**: +```csharp +Debug.Console(1, string.Format("PasswordManager.UpdatePassword: CTimer Started")); +Debug.Console(1, string.Format("PasswordManager.UpdatePassword: CTimer Reset")); +``` + +## 6. Networking and Communication + +### 6.1 Ethernet Communication + +**Libraries Used**: +- `Crestron.SimplSharpPro.EthernetCommunication` +- `Crestron.SimplSharp.Net.Utilities.EthernetHelper` + +**Key Files**: +- `/src/PepperDash.Core/Comm/GenericTcpIpClient.cs` +- `/src/PepperDash.Core/Comm/GenericTcpIpServer.cs` +- `/src/PepperDash.Core/Comm/GenericSecureTcpIpClient.cs` +- `/src/PepperDash.Core/Comm/GenericSshClient.cs` +- `/src/PepperDash.Core/Comm/GenericUdpServer.cs` + +**Usage Pattern**: +```csharp +public class GenericTcpIpClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect +public class GenericSecureTcpIpClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect +``` + +## 7. Device Management Libraries + +### 7.1 DeviceSupport + +**Library**: `Crestron.SimplSharpPro.DeviceSupport` +**Usage**: Core device support infrastructure used throughout the framework + +### 7.2 DM (DigitalMedia) + +**Library**: `Crestron.SimplSharpPro.DM` +**Usage**: Digital media routing and switching support +**Evidence**: Found in routing configuration and DM output card references + +## 8. User Interface Libraries + +### 8.1 UI Components + +**Library**: `Crestron.SimplSharpPro.UI` +**Usage**: User interface elements and touchpanel controls + +### 8.2 Smart Objects + +**Key Files**: +- `/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs` +- `/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferenceList/SubpageReferenceList.cs` + +**Usage**: Advanced UI components with dynamic content + +## 9. System Monitoring and Diagnostics + +### 9.1 Diagnostics + +**Library**: `Crestron.SimplSharpPro.Diagnostics` +**Usage**: System health monitoring and performance tracking + +### 9.2 System Information + +**Key Files**: +- `/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs` + +**Usage**: Provides system status, Ethernet information, and program details + +## 10. Integration Patterns + +### 10.1 SIMPL Bridging + +**Pattern**: Extensive use of `BasicTriList` for SIMPL integration +**Files**: Bridge classes throughout the framework implement `LinkToApi` methods: +```csharp +public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge); +``` + +### 10.2 Device Factory Pattern + +**Implementation**: Factory classes create hardware-specific implementations +**Example**: `CommFactory.cs` provides communication device creation + +### 10.3 Extension Methods + +**Pattern**: Extensive use of extension methods for Crestron classes +**Example**: `TriListExtensions.cs` adds 30+ extension methods to `BasicTriList` + +## 11. Signal Processing + +### 11.1 Signal Types + +**Bool Signals**: Digital control and feedback +**UShort Signals**: Analog values and numeric data +**String Signals**: Text and configuration data + +**Implementation**: Comprehensive signal handling in `TriListExtensions.cs` + +## 12. Error Handling and Logging + +**Pattern**: Consistent use of Crestron's Debug logging throughout +**Examples**: +```csharp +Debug.LogMessage(LogEventLevel.Information, "Device {0} is not a valid device", dc.PortDeviceKey); +Debug.LogMessage(LogEventLevel.Debug, "Error Waking Panel. Maybe testing with Xpanel?"); +``` + +## 13. Threading and Synchronization + +**Components**: +- CTimer for time-based operations +- Thread-safe collections and patterns +- Event-driven programming models + +## Conclusion + +The PepperDash Essentials framework demonstrates sophisticated integration with the Crestron ecosystem, leveraging: + +- **Core Infrastructure**: CrestronControlSystem, Device base classes +- **Communication**: COM, IR, CEC, TCP/IP, SSH protocols +- **Hardware Abstraction**: Touchpanels, I/O devices, processors +- **User Interface**: Smart objects, signal processing, SIMPL bridging +- **System Services**: Monitoring, diagnostics, device management + +This analysis shows that Essentials serves as a comprehensive middleware layer, abstracting Crestron hardware complexities while providing modern software development patterns and practices. + +--- +*Generated: [Current Date]* +*Framework Version: PepperDash Essentials (Based on codebase analysis)* diff --git a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs index c8528c4a..514e9a20 100644 --- a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs @@ -19,11 +19,10 @@ namespace PepperDash.Essentials.Core { foreach (var typeName in TypeNames) { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute != null && descriptionAttribute.Length > 0 - ? descriptionAttribute[0].Description - : throw new InvalidOperationException($"No DescriptionAttribute found for type {typeof(T).FullName}"); + string description = descriptionAttribute != null && descriptionAttribute.Length > 0 + ? descriptionAttribute[0].Description + : "No description available"; var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; ProcessorExtensionDeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); } diff --git a/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs index 06e35850..ee23e310 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs @@ -43,6 +43,7 @@ namespace PepperDash.Essentials.Core /// it will NOT reflect an actual value from a device until has been called /// /// Delegate to invoke when this feedback needs to be updated + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public IntFeedback(Func valueFunc) : this(null, valueFunc) { From 4fc6ecbd0b57c4b102523406f9c2b6af4b127697 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 09:56:39 -0500 Subject: [PATCH 39/42] style: switch to auto property for attributes --- .../Devices/ConfigSnippetAttribute.cs | 10 ++-------- .../Devices/DescriptionAttribute.cs | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs b/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs index 76d3640c..a1fdef35 100644 --- a/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs +++ b/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs @@ -8,26 +8,20 @@ namespace PepperDash.Essentials.Core [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public class ConfigSnippetAttribute : Attribute { - private string _ConfigSnippet; - /// /// Represents a configuration snippet for the device. /// /// public ConfigSnippetAttribute(string configSnippet) { - //Debug.LogMessage(LogEventLevel.Verbose, "Setting Config Snippet {0}", configSnippet); - _ConfigSnippet = configSnippet; + ConfigSnippet = configSnippet; } /// /// Gets the configuration snippet for the device. /// This snippet can be used in the DeviceConfig to instantiate the device. /// - public string ConfigSnippet - { - get { return _ConfigSnippet; } - } + public string ConfigSnippet { get; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs b/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs index 6d4073d9..abe51665 100644 --- a/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs +++ b/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs @@ -8,25 +8,19 @@ namespace PepperDash.Essentials.Core [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)] public class DescriptionAttribute : Attribute { - private string _Description; - /// /// Represents a description attribute for a device. /// /// public DescriptionAttribute(string description) { - //Debug.LogMessage(LogEventLevel.Verbose, "Setting Description: {0}", description); - _Description = description; + Description = description; } /// /// Gets the description for the device. /// - public string Description - { - get { return _Description; } - } + public string Description { get; } } } \ No newline at end of file From ee6f9416a3bc976165469c7bdd12d41855f2449f Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 10:24:32 -0500 Subject: [PATCH 40/42] chore: remove unused configSnippet --- .../ProcessorExtensionDeviceFactory.cs | 11 ++-- .../Factory/DeviceFactory.cs | 8 ++- .../Plugins/PluginLoader.cs | 54 ++----------------- .../DeviceFactory.cs | 7 ++- .../MobileControlFactory.cs | 12 ++--- .../Factory/DeviceFactory.cs | 16 ++---- 6 files changed, 26 insertions(+), 82 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs index 514e9a20..8549fd38 100644 --- a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs @@ -1,8 +1,14 @@ +using System; using System.Collections.Generic; using PepperDash.Essentials.Core.Config; namespace PepperDash.Essentials.Core { + /// + /// Represents a factory for creating processor extension devices. + /// + /// The type of the processor extension device. + [Obsolete("will be removed in a future version")] public abstract class ProcessorExtensionDeviceFactory : IProcessorExtensionDeviceFactory where T : EssentialsDevice { #region IProcessorExtensionDeviceFactory Members @@ -19,11 +25,10 @@ namespace PepperDash.Essentials.Core { foreach (var typeName in TypeNames) { - var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute != null && descriptionAttribute.Length > 0 + string description = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 ? descriptionAttribute[0].Description : "No description available"; - var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + ProcessorExtensionDeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice); } } diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index 9f644b04..b4852f92 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -92,12 +92,10 @@ namespace PepperDash.Essentials.Core { foreach (var typeName in deviceFactory.TypeNames) { - - var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute != null && descriptionAttribute.Length > 0 - ? descriptionAttribute[0].Description + string description = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 + ? descriptionAttribute[0].Description : "No description available"; - var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } diff --git a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs index b77d279b..a1dd9413 100644 --- a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs +++ b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs @@ -523,62 +523,14 @@ namespace PepperDash.Essentials { foreach (var typeName in deviceFactory.TypeNames) { - - var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = descriptionAttribute != null && descriptionAttribute.Length > 0 - ? descriptionAttribute[0].Description + string description = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 + ? descriptionAttribute[0].Description : "No description available"; - var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } - /// - /// Loads a a custom plugin via the legacy method - /// - /// - /// - static void LoadCustomLegacyPlugin(Type type, MethodInfo loadPlugin, LoadedAssembly loadedAssembly) - { - Debug.LogMessage(LogEventLevel.Verbose, "LoadPlugin method found in {0}", type.Name); - - var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static); - - var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion")); - if (minimumVersion != null) - { - Debug.LogMessage(LogEventLevel.Verbose, "MinimumEssentialsFrameworkVersion found"); - - var minimumVersionString = minimumVersion.GetValue(null) as string; - - if (!string.IsNullOrEmpty(minimumVersionString)) - { - var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString); - - if (!passed) - { - Debug.LogMessage(LogEventLevel.Information, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString); - return; - } - else - { - Debug.LogMessage(LogEventLevel.Information, "Passed plugin passed dependency check (required version {0})", minimumVersionString); - } - } - else - { - Debug.LogMessage(LogEventLevel.Information, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary."); - } - } - else - { - Debug.LogMessage(LogEventLevel.Information, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary."); - } - - Debug.LogMessage(LogEventLevel.Information, "Loading legacy plugin: {0}", loadedAssembly.Name); - loadPlugin.Invoke(null, null); - - } /// /// LoadPlugins method diff --git a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs index ff730706..178c53a7 100644 --- a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs @@ -51,11 +51,10 @@ namespace PepperDash.Essentials.Devices.Common foreach (var typeName in deviceFactory.TypeNames) { //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); - var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = (descriptionAttribute != null && descriptionAttribute.Length > 0) - ? descriptionAttribute[0].Description + string description = (deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0) + ? descriptionAttribute[0].Description : "No description available"; - var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs index 32a00b8c..393b3385 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs @@ -50,13 +50,11 @@ namespace PepperDash.Essentials { foreach (var typeName in deviceFactory.TypeNames) { - //Debug.LogMessage(LogEventLevel.Verbose, "Getting Description Attribute from class: '{0}'", typeof(T).FullName); - var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = (descriptionAttribute != null && descriptionAttribute.Length > 0) - ? descriptionAttribute[0].Description - : string.Empty; // Default value if no DescriptionAttribute is found - var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; - Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + string description = (deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0) + ? descriptionAttribute[0].Description + : "No description available"; // Default value if no DescriptionAttribute is found + + DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } } diff --git a/src/PepperDash.Essentials/Factory/DeviceFactory.cs b/src/PepperDash.Essentials/Factory/DeviceFactory.cs index e59628ab..e60b3fa4 100644 --- a/src/PepperDash.Essentials/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials/Factory/DeviceFactory.cs @@ -1,17 +1,11 @@  using System; -using System.Collections.Generic; using System.Linq; using System.Reflection; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharpPro; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; + using PepperDash.Core; using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; namespace PepperDash.Essentials { @@ -59,12 +53,10 @@ namespace PepperDash.Essentials { foreach (var typeName in deviceFactory.TypeNames) { - - var descriptionAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[]; - string description = (descriptionAttribute != null && descriptionAttribute.Length > 0) - ? descriptionAttribute[0].Description + string description = (deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0) + ? descriptionAttribute[0].Description : "No description available"; - var snippetAttribute = deviceFactory.FactoryType.GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[]; + Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } From 615f640ebbebbf7dcc43948b9f6b4554c9023e61 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 10:27:50 -0500 Subject: [PATCH 41/42] fix: use continue instead of return Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index b4852f92..06e685d3 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -155,7 +155,7 @@ namespace PepperDash.Essentials.Core prop.Parent.Replace(secret); } - if (!(prop.Value is JObject recurseProp)) return; + if (!(prop.Value is JObject recurseProp)) continue; CheckForSecrets(recurseProp.Properties()); } From efe70208d348a5766f8b1c26785fd25ad732877c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 25 Jul 2025 10:32:35 -0500 Subject: [PATCH 42/42] fix: check for null assembly name --- src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index 06e685d3..b723f6c9 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -53,9 +53,9 @@ namespace PepperDash.Essentials.Core // Loop through all loaded assemblies that contain at least 1 type that implements IDeviceFactory foreach (var assembly in loadedAssemblies) { - Debug.LogDebug("loaded assembly: {assemblyName}", assembly.GetName().Name); + Debug.LogDebug("loaded assembly: {assemblyName}", assembly.GetName()?.Name ?? "Unknown"); - PluginLoader.AddLoadedAssembly(assembly.GetName().Name, assembly); + PluginLoader.AddLoadedAssembly(assembly.GetName()?.Name ?? "Unknown", assembly); var types = assembly.GetTypes().Where(ct => typeof(IDeviceFactory).IsAssignableFrom(ct) && !ct.IsInterface && !ct.IsAbstract);