mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
feat: added cen-io-ir-104 device and factory
This commit is contained in:
@@ -0,0 +1,62 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Wrapper class for CEN-IO-IR-104 module
|
||||||
|
/// </summary>
|
||||||
|
[Description("Wrapper class for the CEN-IO-IR-104 module")]
|
||||||
|
public class CenIoIr104Controller : EssentialsDevice, IIROutputPorts
|
||||||
|
{
|
||||||
|
public CenIoIr104 Ir104 { get; private set; }
|
||||||
|
|
||||||
|
public CenIoIr104Controller(string key, string name, CenIoIr104 ir104)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
Ir104 = ir104;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IDigitalInputPorts Members
|
||||||
|
|
||||||
|
public CrestronCollection<IROutputPort> IROutputPorts
|
||||||
|
{
|
||||||
|
get { return Ir104.IROutputPorts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int NumberOfIROutputPorts
|
||||||
|
{
|
||||||
|
get { return Ir104.NumberOfIROutputPorts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CenIoIr104ControllerFactory : EssentialsDeviceFactory<CenIoIr104Controller>
|
||||||
|
{
|
||||||
|
public CenIoIr104ControllerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string>() { "cenioir104" };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory Attempting to create new CEN-IR-104 Device");
|
||||||
|
|
||||||
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
|
var ipid = control.IpIdInt;
|
||||||
|
|
||||||
|
return new CenIoIr104Controller(dc.Key, dc.Name, new Crestron.SimplSharpPro.GeneralIO.CenIoIr104(ipid, Global.ControlSystem));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -183,6 +183,7 @@
|
|||||||
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
|
<Compile Include="Crestron IO\Inputs\GenericVersiportInputDevice.cs" />
|
||||||
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
|
<Compile Include="Crestron IO\Inputs\IDigitalInput.cs" />
|
||||||
<Compile Include="Crestron IO\IOPortConfig.cs" />
|
<Compile Include="Crestron IO\IOPortConfig.cs" />
|
||||||
|
<Compile Include="Crestron IO\Ir\CenIoIr104Controller.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\CenIoRy104Controller.cs" />
|
<Compile Include="Crestron IO\Relay\CenIoRy104Controller.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
||||||
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
|
<Compile Include="Crestron IO\Relay\ISwitchedOutput.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user