mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
docs: XML comments for Devices.Common
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Sources
|
||||
{
|
||||
@@ -11,54 +6,59 @@ namespace PepperDash.Essentials.Devices.Common.Sources
|
||||
/// Represents a Laptop
|
||||
/// </summary>
|
||||
public class Laptop : EssentialsDevice, IHasFeedback, IRoutingSource, IRoutingOutputs, IAttachVideoStatus, IUiDisplayInfo, IUsageTracking
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayUiType
|
||||
/// </summary>
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeLaptop; } }
|
||||
/// <summary>
|
||||
/// Gets or sets the IconName
|
||||
/// </summary>
|
||||
public string IconName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the HasPowerOnFeedback
|
||||
/// </summary>
|
||||
public BoolFeedback HasPowerOnFeedback { get; private set; }
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayUiType
|
||||
/// </summary>
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeLaptop; } }
|
||||
/// <summary>
|
||||
/// Gets or sets the IconName
|
||||
/// </summary>
|
||||
public string IconName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the HasPowerOnFeedback
|
||||
/// </summary>
|
||||
public BoolFeedback HasPowerOnFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the AnyVideoOut
|
||||
/// </summary>
|
||||
public RoutingOutputPort AnyVideoOut { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the AnyVideoOut
|
||||
/// </summary>
|
||||
public RoutingOutputPort AnyVideoOut { get; private set; }
|
||||
|
||||
#region IRoutingOutputs Members
|
||||
#region IRoutingOutputs Members
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the OutputPorts
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the OutputPorts
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
public Laptop(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IconName = "Laptop";
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the Laptop class
|
||||
/// </summary>
|
||||
/// <param name="key">The device key</param>
|
||||
/// <param name="name">The device name</param>
|
||||
public Laptop(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IconName = "Laptop";
|
||||
|
||||
HasPowerOnFeedback = new BoolFeedback("HasPowerFeedback",
|
||||
() => this.GetVideoStatuses() != VideoStatusOutputs.NoStatus);
|
||||
HasPowerOnFeedback = new BoolFeedback("HasPowerFeedback",
|
||||
() => this.GetVideoStatuses() != VideoStatusOutputs.NoStatus);
|
||||
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>
|
||||
{
|
||||
(AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.None, 0, this))
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#region IHasFeedback Members
|
||||
#region IHasFeedback Members
|
||||
|
||||
/// <summary>
|
||||
/// Passes through the VideoStatuses list
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Passes through the VideoStatuses list
|
||||
/// </summary>
|
||||
public FeedbackCollection<Feedback> Feedbacks
|
||||
{
|
||||
get
|
||||
@@ -69,7 +69,7 @@ namespace PepperDash.Essentials.Devices.Common.Sources
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region IUsageTracking Members
|
||||
|
||||
@@ -79,26 +79,5 @@ namespace PepperDash.Essentials.Devices.Common.Sources
|
||||
public UsageTracking UsageTracker { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a LaptopFactory
|
||||
/// </summary>
|
||||
public class LaptopFactory : EssentialsDeviceFactory<Laptop>
|
||||
{
|
||||
public LaptopFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "laptop" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Laptop Device");
|
||||
return new Laptop(dc.Key, dc.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user