diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs deleted file mode 100644 index e26e2d7..0000000 --- a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateBridge.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Bridges; - -using Newtonsoft.Json; - -namespace EssentialsPluginTemplateEPI -{ - public static class EssentialsPluginTemplateBridge - { - public static void LinkToApiExt(this EssentialsPluginFactory DspDevice, BasicTriList trilist, uint joinStart, string joinMapKey) - { - // Construct the default join map - EssentialsPluginTemplateBridgeJoinMap joinMap = new EssentialsPluginTemplateBridgeJoinMap(); - - // Attempt to get a custom join map if specified in config - var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); - - // If we find a custom join map, deserialize it - if (!string.IsNullOrEmpty(joinMapSerialized)) - joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - - // Offset the joins based on the join start - joinMap.OffsetJoinNumbers(joinStart); - - - // Set all your join actions here - - - // Link all your feedbacks to joins here - - } - } - public class EssentialsPluginTemplateBridgeJoinMap : JoinMapBase - { - // Specify your joins here - - - public EssentialsPluginTemplateBridgeJoinMap() - { - // Set the values of your joins here - } - - public override void OffsetJoinNumbers(uint joinStart) - { - // Offset the joins from joinStart as applicable - } - } -} \ No newline at end of file diff --git a/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs new file mode 100644 index 0000000..4272a97 --- /dev/null +++ b/PDT.EssentialsPluginTemplate.EPI/EssentialsPluginTemplateJoinMap.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using PepperDash.Essentials.Core; + +namespace PDT.EssentialsPluginTemplate.EPI +{ + public class EssentialsPluginTemplateBridgeJoinMap : JoinMapBaseAdvanced + { + [JoinName("IsOnline")] + public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData {JoinNumber = 1, JoinSpan = 1}, + new JoinMetadata + { + Description = "Device is Online", + JoinType = eJoinType.Digital, + JoinCapabilities = eJoinCapabilities.ToSIMPL + }); + + + public EssentialsPluginTemplateBridgeJoinMap(uint joinStart):base(joinStart, typeof(EssentialsPluginTemplateBridgeJoinMap)) + { + + } + } +} \ No newline at end of file