mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
docs: XML comments for Devices.Common
This commit is contained in:
parent
a5d409e93a
commit
f9d9df9d5c
115 changed files with 5772 additions and 4292 deletions
|
|
@ -1,71 +1,74 @@
|
|||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a InRoomPc
|
||||
/// </summary>
|
||||
public class InRoomPc : 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>
|
||||
/// Represents a InRoomPc
|
||||
/// </summary>
|
||||
public class InRoomPc : 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 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 InRoomPc(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IconName = "PC";
|
||||
HasPowerOnFeedback = new BoolFeedback("HasPowerFeedback",
|
||||
() => this.GetVideoStatuses() != VideoStatusOutputs.NoStatus);
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
OutputPorts.Add(AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.None, 0, this));
|
||||
}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InRoomPc"/> class
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
public InRoomPc(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IconName = "PC";
|
||||
HasPowerOnFeedback = new BoolFeedback("HasPowerFeedback",
|
||||
() => this.GetVideoStatuses() != VideoStatusOutputs.NoStatus);
|
||||
|
||||
#region IHasFeedback Members
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>
|
||||
{
|
||||
(AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.None, 0, this))
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Passes through the VideoStatuses list
|
||||
/// </summary>
|
||||
#region IHasFeedback Members
|
||||
|
||||
/// <summary>
|
||||
/// Passes through the VideoStatuses list
|
||||
/// </summary>
|
||||
public FeedbackCollection<Feedback> Feedbacks
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
var newList = new FeedbackCollection<Feedback>();
|
||||
newList.AddRange(this.GetVideoStatuses().ToList());
|
||||
return newList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region IUsageTracking Members
|
||||
|
||||
|
|
@ -75,27 +78,6 @@ namespace PepperDash.Essentials.Devices.Common.Sources
|
|||
public UsageTracking UsageTracker { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a InRoomPcFactory
|
||||
/// </summary>
|
||||
public class InRoomPcFactory : EssentialsDeviceFactory<InRoomPc>
|
||||
{
|
||||
public InRoomPcFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "inroompc" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new InRoomPc Device");
|
||||
return new InRoomPc(dc.Key, dc.Name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using System.Collections.Generic;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Sources
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a InRoomPcFactory
|
||||
/// </summary>
|
||||
public class InRoomPcFactory : EssentialsDeviceFactory<InRoomPc>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InRoomPcFactory"/> class
|
||||
/// </summary>
|
||||
public InRoomPcFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "inroompc" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new InRoomPc Device");
|
||||
return new InRoomPc(dc.Key, dc.Name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Sources
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a LaptopFactory
|
||||
/// </summary>
|
||||
public class LaptopFactory : EssentialsDeviceFactory<Laptop>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LaptopFactory"/> class
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue