diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs new file mode 100644 index 00000000..6bdfc25c --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/CenIoDigIn104Controller.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.GeneralIO; + +using PepperDash.Core; + +namespace PepperDash.Essentials.Core +{ + /// + /// Wrapper class for CEN-IO-DIGIN-104 digital input module + /// + public class CenIoDigIn104Controller : Device, IDigitalInputPorts + { + public CenIoDi104 Di104 { get; private set; } + + public CenIoDigIn104Controller(string key, string name, CenIoDi104 di104) + : base(key, name) + { + Di104 = di104; + } + + #region IDigitalInputPorts Members + + public CrestronCollection DigitalInputPorts + { + get { return Di104.DigitalInputPorts; } + } + + public int NumberOfDigitalInputPorts + { + get { return Di104.NumberOfDigitalInputPorts; } + } + + #endregion + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs index cfe5af0a..4eddd6ee 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs @@ -52,6 +52,13 @@ namespace PepperDash.Essentials.Core Debug.Console(1, "Factory Attempting to create new Generic Comm Device"); return new GenericComm(dc); } + else if (typeName == "ceniodigin104") + { + var control = CommFactory.GetControlPropertiesConfig(dc); + var ipid = control.CresnetIdInt; + + return new CenIoDigIn104Controller(key, name, new Crestron.SimplSharpPro.GeneralIO.CenIoDi104(ipid, Global.ControlSystem)); + } // then check for types that have been added by plugin dlls. if (FactoryMethods.ContainsKey(typeName)) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 7c3cd563..c6915164 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -62,6 +62,10 @@ False ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll + + False + ..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll + False ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll @@ -114,6 +118,7 @@ +