diff --git a/Essentials Core/PepperDashEssentialsBase/Lighting/Lighting Interfaces.cs b/Essentials Core/PepperDashEssentialsBase/Lighting/Lighting Interfaces.cs new file mode 100644 index 00000000..55c53784 --- /dev/null +++ b/Essentials Core/PepperDashEssentialsBase/Lighting/Lighting Interfaces.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Core; + +namespace PepperDash.Essentials.Core.Lighting +{ + /// + /// Requirements for a device that implements lighting scene control + /// + public interface ILightingScenes + { + event EventHandler LightingSceneChange; + + List LightingScenes { get; } + + void SelectScene(LightingScene scene); + + LightingScene CurrentLightingScene { get; } + + } + + /// + /// Requirements for a device that implements master raise/lower + /// + public interface ILightingMasterRaiseLower + { + void MasterRaise(); + void MasterLower(); + void MasterRaiseLowerStop(); + } + + /// + /// Requiremnts for controlling a lighting load + /// + public interface ILightingLoad + { + void SetLoadLevel(int level); + void Raise(); + void Lower(); + + IntFeedback LoadLevelFeedback { get; } + BoolFeedback LoadIsOnFeedback { get; } + } + + public class LightingSceneChangeEventArgs : EventArgs + { + public LightingScene CurrentLightingScene { get; private set; } + + public LightingSceneChangeEventArgs(LightingScene scene) + { + CurrentLightingScene = scene; + } + } + +} \ No newline at end of file diff --git a/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs b/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs new file mode 100644 index 00000000..88c0661a --- /dev/null +++ b/Essentials Core/PepperDashEssentialsBase/Lighting/LightingBase.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; + +using PepperDash.Core; + +namespace PepperDash.Essentials.Core.Lighting +{ + public abstract class LightingBase : Device, ILightingScenes + { + + #region ILightingScenes Members + + event EventHandler ILightingScenes.LightingSceneChange + { + add { throw new NotImplementedException(); } + remove { throw new NotImplementedException(); } + } + + public List LightingScenes { get; protected set; } + + public LightingScene CurrentLightingScene { get; protected set; } + + #endregion + + + public LightingBase(string key, string name) : + base(key, name) + { + LightingScenes = new List(); + } + + + public abstract void SelectScene(LightingScene scene); + + } + + public class LightingScene + { + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 2f6ec383..ad873245 100644 --- a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -111,6 +111,8 @@ + + diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj index 61e2f32e..0a99b128 100644 --- a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj @@ -120,8 +120,8 @@ - - + + diff --git a/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs b/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs index 1396729a..419c6981 100644 --- a/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs +++ b/Essentials/PepperDashEssentials/Room/Cotija/CotijaSystemController.cs @@ -280,7 +280,7 @@ namespace PepperDash.Essentials WSClient.SendAsync(messageBytes, (uint)messageBytes.Length, WebSocketClient.WEBSOCKET_PACKET_TYPES.LWS_WS_OPCODE_07__TEXT_FRAME); } - + } /// diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 97c66930..e33cc888 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index 696e986d..29a0431b 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ