mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Added lighting interfaces and base class
This commit is contained in:
@@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Requirements for a device that implements lighting scene control
|
||||||
|
/// </summary>
|
||||||
|
public interface ILightingScenes
|
||||||
|
{
|
||||||
|
event EventHandler<LightingSceneChangeEventArgs> LightingSceneChange;
|
||||||
|
|
||||||
|
List<LightingScene> LightingScenes { get; }
|
||||||
|
|
||||||
|
void SelectScene(LightingScene scene);
|
||||||
|
|
||||||
|
LightingScene CurrentLightingScene { get; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Requirements for a device that implements master raise/lower
|
||||||
|
/// </summary>
|
||||||
|
public interface ILightingMasterRaiseLower
|
||||||
|
{
|
||||||
|
void MasterRaise();
|
||||||
|
void MasterLower();
|
||||||
|
void MasterRaiseLowerStop();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Requiremnts for controlling a lighting load
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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<LightingSceneChangeEventArgs> ILightingScenes.LightingSceneChange
|
||||||
|
{
|
||||||
|
add { throw new NotImplementedException(); }
|
||||||
|
remove { throw new NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<LightingScene> LightingScenes { get; protected set; }
|
||||||
|
|
||||||
|
public LightingScene CurrentLightingScene { get; protected set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
public LightingBase(string key, string name) :
|
||||||
|
base(key, name)
|
||||||
|
{
|
||||||
|
LightingScenes = new List<LightingScene>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract void SelectScene(LightingScene scene);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LightingScene
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -111,6 +111,8 @@
|
|||||||
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
|
||||||
<Compile Include="Devices\CodecInterfaces.cs" />
|
<Compile Include="Devices\CodecInterfaces.cs" />
|
||||||
<Compile Include="Global\JobTimer.cs" />
|
<Compile Include="Global\JobTimer.cs" />
|
||||||
|
<Compile Include="Lighting\Lighting Interfaces.cs" />
|
||||||
|
<Compile Include="Lighting\LightingBase.cs" />
|
||||||
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
||||||
<Compile Include="Comm and IR\CommFactory.cs" />
|
<Compile Include="Comm and IR\CommFactory.cs" />
|
||||||
<Compile Include="Comm and IR\CommunicationExtras.cs" />
|
<Compile Include="Comm and IR\CommunicationExtras.cs" />
|
||||||
|
|||||||
@@ -120,8 +120,8 @@
|
|||||||
<Compile Include="DSP\PolycomSoundStructure\SoundStructureBasics.cs" />
|
<Compile Include="DSP\PolycomSoundStructure\SoundStructureBasics.cs" />
|
||||||
<Compile Include="Factory\DeviceFactory.cs" />
|
<Compile Include="Factory\DeviceFactory.cs" />
|
||||||
<Compile Include="Generic\GenericSource.cs" />
|
<Compile Include="Generic\GenericSource.cs" />
|
||||||
<Compile Include="MIcrophone\MicrophonePrivacyController.cs" />
|
<Compile Include="Microphone\MicrophonePrivacyController.cs" />
|
||||||
<Compile Include="MIcrophone\MicrophonePrivacyControllerConfig.cs" />
|
<Compile Include="Microphone\MicrophonePrivacyControllerConfig.cs" />
|
||||||
<Compile Include="Occupancy\EssentialsGlsOccupancySensorBaseController.cs" />
|
<Compile Include="Occupancy\EssentialsGlsOccupancySensorBaseController.cs" />
|
||||||
<Compile Include="Occupancy\EssentialsOccupancyAggregator.cs" />
|
<Compile Include="Occupancy\EssentialsOccupancyAggregator.cs" />
|
||||||
<Compile Include="Occupancy\iOccupancyStatusProvider.cs" />
|
<Compile Include="Occupancy\iOccupancyStatusProvider.cs" />
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user