More progress on relay based shade control

This commit is contained in:
Neil Dorin
2018-05-01 16:45:18 -06:00
parent 9c8f85555e
commit 33f0a1fe32
9 changed files with 123 additions and 17 deletions

View File

@@ -182,6 +182,8 @@
<Compile Include="Feedbacks\BoolFeedbackPulseExtender.cs" />
<Compile Include="Routing\RoutingPortNames.cs" />
<Compile Include="Routing\TieLineConfig.cs" />
<Compile Include="Shades\Shade Interfaces.cs" />
<Compile Include="Shades\ShadeController.cs" />
<Compile Include="SmartObjects\SmartObjectNumeric.cs" />
<Compile Include="SmartObjects\SmartObjectDynamicList.cs" />
<Compile Include="SmartObjects\SmartObjectDPad.cs" />

View File

@@ -6,7 +6,18 @@ using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Shades
{
public class Shade Interfaces
{
public interface IShades
{
List<ShadeBase> Shades { get; }
}
/// <summary>
/// Requirements for a device that implements basic shade control
/// </summary>
public interface iShadesRaiseLower
{
void Raise();
void Lower();
void Stop();
}
}

View File

@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Shades
{
public class ShadeBase
{
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
namespace PepperDash.Essentials.Core.Shades
{
public class ShadeController : Device, IShades
{
public List<ShadeBase> IShades.Shades { get; private set; }
}
public abstract class ShadeBase : Device, iShadesRaiseLower
{
public ShadeBase(string key, string name)
: base(key, name)
{
}
#region iShadesRaiseLower Members
public void iShadesRaiseLower.Raise();
public void iShadesRaiseLower.Lower();
public void iShadesRaiseLower.Stop();
#endregion
}
}