Commit before switching branches

This commit is contained in:
Neil Dorin
2018-09-20 14:14:59 -06:00
parent c2665f0225
commit d98b7e837a
6 changed files with 26 additions and 31 deletions

View File

@@ -5,6 +5,8 @@ using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.EthernetCommunication;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Devices;
@@ -76,20 +78,24 @@ namespace PepperDash.Essentials.Bridges
}
}
/// <summary>
/// Defines each type and it's matching API type
/// </summary>
public static class DeviceApiFactory
public class EiscApiPropertiesConfig
{
public static Dictionary<Type, Type> TypeMap = new Dictionary<Type, Type>
[JsonProperty("control")]
public EssentialsControlPropertiesConfig Control { get; set; }
[JsonProperty("devices")]
public List<ApiDevice> Devices { get; set; }
public class ApiDevice
{
{ typeof(DmChassisController), typeof(DmChassisControllerApi) },
{ typeof(IBasicCommunication), typeof(IBasicCommunicationApi) }
//{ typeof(SomeShittyDisplayController), typeof(SomeShittyDisplayControllerApi) }
};
[JsonProperty("deviceKey")]
public string DeviceKey { get; set; }
[JsonProperty("joinStart")]
public int JoinStart { get; set; }
}
}
@@ -159,20 +165,6 @@ namespace PepperDash.Essentials.Bridges
public class DmChassisController : Device
{
public DmChassisController(string key)
: base(key)
{
}
public void SetInput(int input)
{
Debug.Console(2, this, "Dm Chassis {0}, input {1}", Key, input);
}
}
/// <summary>
/// Each flavor of API is a static class with static properties and a static constructor that
/// links up the things to do.