mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-15 13:36:48 +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,60 +1,63 @@
|
|||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a AppleTV
|
||||
/// Wrapper class for an IR-Controlled AppleTV
|
||||
/// </summary>
|
||||
[Description("Wrapper class for an IR-Controlled AppleTV")]
|
||||
/// <summary>
|
||||
/// Represents a AppleTV
|
||||
/// </summary>
|
||||
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingSource, IRoutingOutputs
|
||||
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingSource, IRoutingOutputs
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the IrPort
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the IrPort
|
||||
/// </summary>
|
||||
public IrOutputPortController IrPort { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Standard Driver Name
|
||||
/// </summary>
|
||||
public const string StandardDriverName = "Apple_AppleTV_4th_Gen_Essentials.ir";
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayUiType
|
||||
/// </summary>
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayUiType
|
||||
/// </summary>
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
||||
|
||||
public AppleTV(string key, string name, IrOutputPortController portCont)
|
||||
: base(key, name)
|
||||
{
|
||||
IrPort = portCont;
|
||||
DeviceManager.AddDevice(portCont);
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AppleTV"/> class
|
||||
/// </summary>
|
||||
/// <param name="key">The device key</param>
|
||||
/// <param name="name">The device name</param>
|
||||
/// <param name="portCont">The IR output port controller</param>
|
||||
public AppleTV(string key, string name, IrOutputPortController portCont)
|
||||
: base(key, name)
|
||||
{
|
||||
IrPort = portCont;
|
||||
DeviceManager.AddDevice(portCont);
|
||||
|
||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
|
||||
eRoutingPortConnectionType.DigitalAudio, null, this);
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
|
||||
eRoutingPortConnectionType.DigitalAudio, null, this);
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
||||
|
||||
PrintExpectedIrCommands();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PrintExpectedIrCommands method
|
||||
/// </summary>
|
||||
public void PrintExpectedIrCommands()
|
||||
{
|
||||
var cmds = typeof (AppleTvIrCommands).GetFields(BindingFlags.Public | BindingFlags.Static);
|
||||
var cmds = typeof(AppleTvIrCommands).GetFields(BindingFlags.Public | BindingFlags.Static);
|
||||
|
||||
foreach (var value in cmds.Select(cmd => cmd.GetValue(null)).OfType<string>())
|
||||
{
|
||||
|
|
@ -64,151 +67,158 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
|
||||
#region IDPad Members
|
||||
|
||||
/// <summary>
|
||||
/// Up method
|
||||
/// </summary>
|
||||
public void Up(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Up, pressRelease);
|
||||
}
|
||||
/// <summary>
|
||||
/// Up method
|
||||
/// </summary>
|
||||
public void Up(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Up, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Down method
|
||||
/// </summary>
|
||||
public void Down(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Down, pressRelease);
|
||||
}
|
||||
/// <summary>
|
||||
/// Down method
|
||||
/// </summary>
|
||||
public void Down(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Down, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Left method
|
||||
/// </summary>
|
||||
public void Left(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Left, pressRelease);
|
||||
}
|
||||
/// <summary>
|
||||
/// Left method
|
||||
/// </summary>
|
||||
public void Left(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Left, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Right method
|
||||
/// </summary>
|
||||
public void Right(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Right, pressRelease);
|
||||
}
|
||||
/// <summary>
|
||||
/// Right method
|
||||
/// </summary>
|
||||
public void Right(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Right, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select method
|
||||
/// </summary>
|
||||
public void Select(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Enter, pressRelease);
|
||||
}
|
||||
/// <summary>
|
||||
/// Select method
|
||||
/// </summary>
|
||||
public void Select(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Enter, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Menu method
|
||||
/// </summary>
|
||||
public void Menu(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Menu, pressRelease);
|
||||
}
|
||||
/// <summary>
|
||||
/// Menu method
|
||||
/// </summary>
|
||||
public void Menu(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.Menu, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exit method
|
||||
/// </summary>
|
||||
public void Exit(bool pressRelease)
|
||||
{
|
||||
/// <summary>
|
||||
/// Exit method
|
||||
/// </summary>
|
||||
public void Exit(bool pressRelease)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region ITransport Members
|
||||
#region ITransport Members
|
||||
|
||||
/// <summary>
|
||||
/// Play method
|
||||
/// </summary>
|
||||
public void Play(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pause method
|
||||
/// </summary>
|
||||
public void Pause(bool pressRelease)
|
||||
{
|
||||
/// <summary>
|
||||
/// Play method
|
||||
/// </summary>
|
||||
public void Play(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
/// <summary>
|
||||
/// Rewind method
|
||||
/// </summary>
|
||||
public void Rewind(bool pressRelease)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Pause method
|
||||
/// </summary>
|
||||
public void Pause(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(AppleTvIrCommands.PlayPause, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void FFwd(bool pressRelease)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
/// <summary>
|
||||
/// Rewind method
|
||||
/// </summary>
|
||||
public void Rewind(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void ChapMinus(bool pressRelease)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void FFwd(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void ChapPlus(bool pressRelease)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void ChapMinus(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void Stop(bool pressRelease)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void ChapPlus(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void Record(bool pressRelease)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void Stop(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
public void Record(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
||||
#region IRoutingOutputs Members
|
||||
#endregion
|
||||
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
public RoutingOutputPort AnyAudioOut { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the OutputPorts
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
#region IRoutingOutputs Members
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Gets the HdmiOut
|
||||
/// </summary>
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the AnyAudioOut
|
||||
/// </summary>
|
||||
public RoutingOutputPort AnyAudioOut { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the OutputPorts
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new AppleTvJoinMap(joinStart);
|
||||
|
||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||
|
|
@ -235,42 +245,6 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
trilist.SetBoolSigAction(joinMap.Select.JoinNumber, Select);
|
||||
trilist.SetBoolSigAction(joinMap.Menu.JoinNumber, Menu);
|
||||
trilist.SetBoolSigAction(joinMap.PlayPause.JoinNumber, Play);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a AppleTVFactory
|
||||
/// </summary>
|
||||
public class AppleTVFactory : EssentialsDeviceFactory<AppleTV>
|
||||
{
|
||||
public AppleTVFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "appletv" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new AppleTV Device");
|
||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||
return new AppleTV(dc.Key, dc.Name, irCont);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AppleTvIrCommands
|
||||
{
|
||||
|
||||
public static string Up = "+";
|
||||
public static string Down = "-";
|
||||
public static string Left = IROutputStandardCommands.IROut_TRACK_MINUS;
|
||||
public static string Right = IROutputStandardCommands.IROut_TRACK_PLUS;
|
||||
public static string Enter = IROutputStandardCommands.IROut_ENTER;
|
||||
public static string PlayPause = "PLAY/PAUSE";
|
||||
public static string Rewind = "REWIND";
|
||||
public static string Menu = "Menu";
|
||||
public static string FastForward = "FASTFORWARD";
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a AppleTVFactory
|
||||
/// </summary>
|
||||
public class AppleTVFactory : EssentialsDeviceFactory<AppleTV>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AppleTVFactory"/> class
|
||||
/// </summary>
|
||||
public AppleTVFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "appletv" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new AppleTV Device");
|
||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||
return new AppleTV(dc.Key, dc.Name, irCont);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
using Crestron.SimplSharpPro;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents AppleTvIrCommands
|
||||
/// </summary>
|
||||
public static class AppleTvIrCommands
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Up command
|
||||
/// </summary>
|
||||
public static string Up = "+";
|
||||
|
||||
/// <summary>
|
||||
/// Down command
|
||||
/// </summary>
|
||||
public static string Down = "-";
|
||||
|
||||
/// <summary>
|
||||
/// Left command
|
||||
/// </summary>
|
||||
public static string Left = IROutputStandardCommands.IROut_TRACK_MINUS;
|
||||
|
||||
/// <summary>
|
||||
/// Right command
|
||||
/// </summary>
|
||||
public static string Right = IROutputStandardCommands.IROut_TRACK_PLUS;
|
||||
|
||||
/// <summary>
|
||||
/// Enter command
|
||||
/// </summary>
|
||||
public static string Enter = IROutputStandardCommands.IROut_ENTER;
|
||||
|
||||
/// <summary>
|
||||
/// PlayPause command
|
||||
/// </summary>
|
||||
public static string PlayPause = "PLAY/PAUSE";
|
||||
|
||||
/// <summary>
|
||||
/// Rewind command
|
||||
/// </summary>
|
||||
public static string Rewind = "REWIND";
|
||||
|
||||
/// <summary>
|
||||
/// Menu command
|
||||
/// </summary>
|
||||
public static string Menu = "Menu";
|
||||
|
||||
/// <summary>
|
||||
/// FastForward command
|
||||
/// </summary>
|
||||
public static string FastForward = "FASTFORWARD";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,107 +1,106 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
using PepperDash.Core;
|
||||
using Crestron.SimplSharpPro;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
[Description("Wrapper class for an IR-Controlled Roku")]
|
||||
/// <summary>
|
||||
/// Represents a Roku2
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a Roku2
|
||||
/// Wrapper class for an IR-Controlled Roku
|
||||
/// </summary>
|
||||
[Description("Wrapper class for an IR-Controlled Roku")]
|
||||
public class Roku2 : EssentialsDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingSource, IRoutingOutputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the IrPort
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Gets or sets the IrPort
|
||||
/// </summary>
|
||||
public IrOutputPortController IrPort { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Standard Driver Name
|
||||
/// </summary>
|
||||
public const string StandardDriverName = "Roku XD_S.ir";
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayUiType
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayUiType
|
||||
/// </summary>
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeRoku; } }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Roku2"/> class
|
||||
/// </summary>
|
||||
public Roku2(string key, string name, IrOutputPortController portCont)
|
||||
: base(key, name)
|
||||
{
|
||||
IrPort = portCont;
|
||||
DeviceManager.AddDevice(portCont);;
|
||||
DeviceManager.AddDevice(portCont); ;
|
||||
|
||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this);
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut };
|
||||
}
|
||||
|
||||
#region IDPad Members
|
||||
|
||||
/// <summary>
|
||||
/// Up method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Up method
|
||||
/// </summary>
|
||||
public void Up(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Down method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Down method
|
||||
/// </summary>
|
||||
public void Down(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Left method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Left method
|
||||
/// </summary>
|
||||
public void Left(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Right method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Right method
|
||||
/// </summary>
|
||||
public void Right(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Select method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Select method
|
||||
/// </summary>
|
||||
public void Select(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Menu method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Menu method
|
||||
/// </summary>
|
||||
public void Menu(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exit method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Exit method
|
||||
/// </summary>
|
||||
public void Exit(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease);
|
||||
|
|
@ -111,49 +110,46 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
|
||||
#region ITransport Members
|
||||
|
||||
/// <summary>
|
||||
/// Play method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Play method
|
||||
/// </summary>
|
||||
public void Play(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pause method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Pause method
|
||||
/// </summary>
|
||||
public void Pause(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_PAUSE, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewind method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// Rewind method
|
||||
/// </summary>
|
||||
public void Rewind(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FFwd method
|
||||
/// </summary>
|
||||
[Api]
|
||||
/// <summary>
|
||||
/// FFwd method
|
||||
/// </summary>
|
||||
public void FFwd(bool pressRelease)
|
||||
{
|
||||
IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not implemented
|
||||
/// ChapMinus method - Not implemented
|
||||
/// </summary>
|
||||
/// <param name="pressRelease"></param>
|
||||
/// <summary>
|
||||
/// ChapMinus method
|
||||
/// </summary>
|
||||
public void ChapMinus(bool pressRelease)
|
||||
{
|
||||
}
|
||||
|
|
@ -186,34 +182,18 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
|
||||
#region IRoutingOutputs Members
|
||||
|
||||
/// <summary>
|
||||
/// HdmiOut
|
||||
/// </summary>
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// OutputPorts
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Roku2Factory
|
||||
/// </summary>
|
||||
public class Roku2Factory : EssentialsDeviceFactory<Roku2>
|
||||
{
|
||||
public Roku2Factory()
|
||||
{
|
||||
TypeNames = new List<string>() { "roku" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Roku Device");
|
||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||
return new Roku2(dc.Key, dc.Name, irCont);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Roku2Factory
|
||||
/// </summary>
|
||||
public class Roku2Factory : EssentialsDeviceFactory<Roku2>
|
||||
{
|
||||
/// <summary>
|
||||
/// Roku2Factory constructor
|
||||
/// </summary>
|
||||
public Roku2Factory()
|
||||
{
|
||||
TypeNames = new List<string>() { "roku" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Roku Device");
|
||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||
return new Roku2(dc.Key, dc.Name, irCont);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue