From 78fe799afc6b09141c210655e0b779d6b13b7ce4 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Mon, 9 Sep 2019 16:11:20 -0600 Subject: [PATCH 1/4] Updates all Bridge types to properly support custom join maps from config. Corrects issues in DisplayControllerBridge due to static properties outside of LinkToApi method. (ECS-1153) --- .../Bridges/AirMediaControllerBridge.cs | 12 +- PepperDashEssentials/Bridges/AppleTvBridge.cs | 12 +- PepperDashEssentials/Bridges/BridgeBase.cs | 31 +- .../Bridges/CameraControllerBridge.cs | 290 ++++++++---------- .../Bridges/DigitalLoggerBridge.cs | 105 +++---- .../Bridges/DisplayControllerBridge.cs | 235 +++++++------- .../Bridges/DmChassisControllerBridge.cs | 11 +- .../Bridges/DmRmcControllerBridge.cs | 10 +- .../Bridges/DmTxControllerBridge.cs | 10 +- .../DmpsAudioOutputControllerBridge.cs | 10 +- .../Bridges/DmpsRoutingControllerBridge.cs | 10 +- .../Bridges/GenericLightingBridge.cs | 165 ++++------ .../Bridges/GenericRelayDeviceBridge.cs | 11 +- .../Bridges/HdMdxxxCEControllerBridge.cs | 10 +- .../Bridges/IBasicCommunicationBridge.cs | 9 +- .../Bridges/IDigitalInputBridge.cs | 11 +- .../JoinMaps/AirMediaControllerJoinMap.cs | 1 + .../Bridges/JoinMaps/AppleTvJoinMap.cs | 1 + .../JoinMaps/CameraControllerJoinMap.cs | 61 ++++ .../Bridges/JoinMaps/DigitalLoggerJoinMap.cs | 48 +++ .../JoinMaps/DisplayControllerJoinMap.cs | 1 + .../JoinMaps/DmChassisControllerJoinMap.cs | 1 + .../JoinMaps/DmRmcControllerJoinMap.cs | 1 + .../Bridges/JoinMaps/DmTxControllerJoinMap.cs | 1 + .../DmpsAudioOutputControllerJoinMap.cs | 1 + .../JoinMaps/DmpsRoutingControllerJoinMap.cs | 1 + .../JoinMaps/GenericLightingJoinMap.cs | 41 +++ .../JoinMaps/GenericRelayControllerJoinMap.cs | 1 + .../JoinMaps/HdMdxxxCEControllerJoinMap.cs | 1 + .../JoinMaps/IBasicCommunicationJoinMap.cs | 1 + .../Bridges/JoinMaps/IDigitalInputJoinMap.cs | 1 + .../Bridges/JoinMaps/SystemMonitorJoinMap.cs | 1 + .../Bridges/SystemMonitorBridge.cs | 18 +- .../PepperDashEssentials.csproj | 4 +- .../Config/BasicConfig.cs | 3 + .../JoinMaps}/JoinMapBase.cs | 19 +- .../PepperDash_Essentials_Core.csproj | 1 + .../Interfaces => Cameras}/CameraControl.cs | 0 .../Essentials Devices Common.csproj | 2 +- 39 files changed, 627 insertions(+), 525 deletions(-) create mode 100644 PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs create mode 100644 PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs create mode 100644 PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs rename {PepperDashEssentials/Bridges => essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps}/JoinMapBase.cs (57%) rename essentials-framework/Essentials Devices Common/Essentials Devices Common/{VideoCodec/Interfaces => Cameras}/CameraControl.cs (100%) diff --git a/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs b/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs index c7542f11..1f1b64dc 100644 --- a/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs +++ b/PepperDashEssentials/Bridges/AirMediaControllerBridge.cs @@ -9,18 +9,20 @@ using PepperDash.Essentials.Core; using PepperDash.Essentials.Devices.Common; using PepperDash.Essentials.DM.AirMedia; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class AirMediaControllerApiExtensions { public static void LinkToApi(this AirMediaController airMedia, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as AirMediaControllerJoinMap; + AirMediaControllerJoinMap joinMap = new AirMediaControllerJoinMap(); - if (joinMap == null) - { - joinMap = new AirMediaControllerJoinMap(); - } + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/AppleTvBridge.cs b/PepperDashEssentials/Bridges/AppleTvBridge.cs index fe362aa3..6169a712 100644 --- a/PepperDashEssentials/Bridges/AppleTvBridge.cs +++ b/PepperDashEssentials/Bridges/AppleTvBridge.cs @@ -9,18 +9,20 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Devices.Common; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class AppleTvApiExtensions { public static void LinkToApi(this AppleTV appleTv, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as AppleTvJoinMap; + AppleTvJoinMap joinMap = new AppleTvJoinMap(); - if (joinMap == null) - { - joinMap = new AppleTvJoinMap(); - } + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if(!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index d14af594..462ba981 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -12,6 +12,7 @@ using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Lighting; using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Devices.Common; +using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.CrestronIO; using PepperDash.Essentials.DM; @@ -87,11 +88,11 @@ namespace PepperDash.Essentials.Bridges (device as GenericComm).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } - //else if (device is CameraBase) - //{ - // (device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); - // continue; - //} + else if (device is CameraBase) + { + (device as CameraBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } else if (device is PepperDash.Essentials.Core.DisplayBase) { (device as DisplayBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); @@ -147,16 +148,16 @@ namespace PepperDash.Essentials.Bridges (device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } - //else if (device is LightingBase) - //{ - // (device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); - // continue; - //} - //else if (device is DigitalLogger) - //{ - // (device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); - // continue; - //} + else if (device is LightingBase) + { + (device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } + else if (device is DigitalLogger) + { + (device as DigitalLogger).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } } } diff --git a/PepperDashEssentials/Bridges/CameraControllerBridge.cs b/PepperDashEssentials/Bridges/CameraControllerBridge.cs index a0bdfdd2..badf9ea0 100644 --- a/PepperDashEssentials/Bridges/CameraControllerBridge.cs +++ b/PepperDashEssentials/Bridges/CameraControllerBridge.cs @@ -1,187 +1,137 @@ -//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.Devices.Common; +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.Devices.Common; +using PepperDash.Essentials.Devices.Common.Cameras; -//namespace PepperDash.Essentials.Bridges -//{ -// public static class CameraControllerApiExtensions -// { +using Newtonsoft.Json; -// public static BasicTriList _TriList; -// public static CameraControllerJoinMap JoinMap; -// public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey) -// { -// JoinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as CameraControllerJoinMap; - -// _TriList = trilist; -// if (JoinMap == null) -// { -// JoinMap = new CameraControllerJoinMap(); -// } - -// JoinMap.OffsetJoinNumbers(joinStart); -// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); -// Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString()); +namespace PepperDash.Essentials.Bridges +{ + public static class CameraControllerApiExtensions + { -// var commMonitor = cameraDevice as ICommunicationMonitor; -// commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]); + public static void LinkToApi(this PepperDash.Essentials.Devices.Common.Cameras.CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey) + { + CameraControllerJoinMap joinMap = new CameraControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); -// trilist.SetBoolSigAction(JoinMap.Left, (b) => -// { -// if (b) -// { -// cameraDevice.PanLeft(); -// } -// else -// { -// cameraDevice.Stop(); -// } -// }); -// trilist.SetBoolSigAction(JoinMap.Right, (b) => -// { -// if (b) -// { -// cameraDevice.PanRight(); -// } -// else -// { -// cameraDevice.Stop(); -// } -// }); + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); -// trilist.SetBoolSigAction(JoinMap.Up, (b) => -// { -// if (b) -// { -// cameraDevice.TiltUp(); -// } -// else -// { -// cameraDevice.Stop(); -// } -// }); -// trilist.SetBoolSigAction(JoinMap.Down, (b) => -// { -// if (b) -// { -// cameraDevice.TiltDown(); -// } -// else -// { -// cameraDevice.Stop(); -// } -// }); + joinMap.OffsetJoinNumbers(joinStart); -// trilist.SetBoolSigAction(JoinMap.ZoomIn, (b) => -// { -// if (b) -// { -// cameraDevice.ZoomIn(); -// } -// else -// { -// cameraDevice.Stop(); -// } -// }); + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(0, "Linking to Bridge Type {0}", cameraDevice.GetType().Name.ToString()); -// trilist.SetBoolSigAction(JoinMap.ZoomOut, (b) => -// { -// if (b) -// { -// cameraDevice.ZoomOut(); -// } -// else -// { -// cameraDevice.Stop(); -// } -// }); + var commMonitor = cameraDevice as ICommunicationMonitor; + commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); + var ptzCamera = cameraDevice as IHasCameraPtzControl; -// if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca") -// { -// var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca; -// trilist.SetSigTrueAction(JoinMap.PowerOn, () => viscaCamera.PowerOn()); -// trilist.SetSigTrueAction(JoinMap.PowerOff, () => viscaCamera.PowerOff()); + if (ptzCamera != null) + { + trilist.SetBoolSigAction(joinMap.Left, (b) => + { + if (b) + { + ptzCamera.PanLeft(); + } + else + { + ptzCamera.PanStop(); + } + }); + trilist.SetBoolSigAction(joinMap.Right, (b) => + { + if (b) + { + ptzCamera.PanRight(); + } + else + { + ptzCamera.PanStop(); + } + }); -// viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.PowerOn]); -// viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[JoinMap.PowerOff]); + trilist.SetBoolSigAction(joinMap.Up, (b) => + { + if (b) + { + ptzCamera.TiltUp(); + } + else + { + ptzCamera.TiltStop(); + } + }); + trilist.SetBoolSigAction(joinMap.Down, (b) => + { + if (b) + { + ptzCamera.TiltDown(); + } + else + { + ptzCamera.TiltStop(); + } + }); -// viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.IsOnline]); -// for (int i = 0; i < JoinMap.NumberOfPresets; i++) -// { -// int tempNum = i; -// trilist.SetSigTrueAction((ushort)(JoinMap.PresetRecallOffset + tempNum), () => -// { -// viscaCamera.RecallPreset(tempNum); -// }); -// trilist.SetSigTrueAction((ushort)(JoinMap.PresetSaveOffset + tempNum), () => -// { -// viscaCamera.SavePreset(tempNum); -// }); -// } -// } + trilist.SetBoolSigAction(joinMap.ZoomIn, (b) => + { + if (b) + { + ptzCamera.ZoomIn(); + } + else + { + ptzCamera.ZoomStop(); + } + }); - - -// } + trilist.SetBoolSigAction(joinMap.ZoomOut, (b) => + { + if (b) + { + ptzCamera.ZoomOut(); + } + else + { + ptzCamera.ZoomStop(); + } + }); + } + if (cameraDevice.GetType().Name.ToString().ToLower() == "cameravisca") + { + var viscaCamera = cameraDevice as PepperDash.Essentials.Devices.Common.Cameras.CameraVisca; + trilist.SetSigTrueAction(joinMap.PowerOn, () => viscaCamera.PowerOn()); + trilist.SetSigTrueAction(joinMap.PowerOff, () => viscaCamera.PowerOff()); -// } -// public class CameraControllerJoinMap : JoinMapBase -// { -// public uint IsOnline { get; set; } -// public uint PowerOff { get; set; } -// public uint PowerOn { get; set; } -// public uint Up { get; set; } -// public uint Down { get; set; } -// public uint Left { get; set; } -// public uint Right { get; set; } -// public uint ZoomIn { get; set; } -// public uint ZoomOut { get; set; } -// public uint PresetRecallOffset { get; set; } -// public uint PresetSaveOffset { get; set; } -// public uint NumberOfPresets { get; set; } + viscaCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]); + viscaCamera.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]); -// public CameraControllerJoinMap() -// { -// // Digital -// IsOnline = 9; -// PowerOff = 8; -// PowerOn = 7; -// Up = 1; -// Down = 2; -// Left = 3; -// Right = 4; -// ZoomIn = 5; -// ZoomOut = 6; -// PresetRecallOffset = 10; -// PresetSaveOffset = 30; -// NumberOfPresets = 5; -// // Analog -// } + viscaCamera.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); + for (int i = 0; i < joinMap.NumberOfPresets; i++) + { + int tempNum = i; + trilist.SetSigTrueAction((ushort)(joinMap.PresetRecallOffset + tempNum), () => + { + viscaCamera.RecallPreset(tempNum); + }); + trilist.SetSigTrueAction((ushort)(joinMap.PresetSaveOffset + tempNum), () => + { + viscaCamera.SavePreset(tempNum); + }); + } + } + } + } -// public override void OffsetJoinNumbers(uint joinStart) -// { -// var joinOffset = joinStart - 1; - -// IsOnline = IsOnline + joinOffset; -// PowerOff = PowerOff + joinOffset; -// PowerOn = PowerOn + joinOffset; -// Up = Up + joinOffset; -// Down = Down + joinOffset; -// Left = Left + joinOffset; -// Right = Right + joinOffset; -// ZoomIn = ZoomIn + joinOffset; -// ZoomOut = ZoomOut + joinOffset; -// PresetRecallOffset = PresetRecallOffset + joinOffset; -// PresetSaveOffset = PresetSaveOffset + joinOffset; -// } -// } -//} \ No newline at end of file +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DigitalLoggerBridge.cs b/PepperDashEssentials/Bridges/DigitalLoggerBridge.cs index ef529165..2c857da2 100644 --- a/PepperDashEssentials/Bridges/DigitalLoggerBridge.cs +++ b/PepperDashEssentials/Bridges/DigitalLoggerBridge.cs @@ -1,77 +1,42 @@ -//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.Devices.Common; +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.Devices.Common; -//namespace PepperDash.Essentials.Bridges -//{ -// public static class DigitalLoggerApiExtensions -// { -// public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey) -// { -// var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DigitalLoggerJoinMap; +using Newtonsoft.Json; -// if (joinMap == null) -// joinMap = new DigitalLoggerJoinMap(); +namespace PepperDash.Essentials.Bridges +{ + public static class DigitalLoggerApiExtensions + { + public static void LinkToApi(this DigitalLogger DigitalLogger, BasicTriList trilist, uint joinStart, string joinMapKey) + { + DigitalLoggerJoinMap joinMap = new DigitalLoggerJoinMap(); -// joinMap.OffsetJoinNumbers(joinStart); -// Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); -// for (uint i = 1; i <= DigitalLogger.CircuitCount; i++) -// { -// var circuit = i; -// DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]); -// DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]); -// DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]); -// trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1)); -// trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1)); -// trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1)); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); -// } -// } -// } -// public class DigitalLoggerJoinMap : JoinMapBase -// { -// public uint IsOnline { get; set; } -// public uint CircuitNames { get; set; } -// public uint CircuitState { get; set; } -// public uint CircuitCycle { get; set; } -// public uint CircuitIsCritical { get; set; } -// public uint CircuitOnCmd { get; set; } -// public uint CircuitOffCmd { get; set; } -// public DigitalLoggerJoinMap() -// { -// // Digital -// IsOnline = 9; -// CircuitState = 0; -// CircuitCycle = 0; -// CircuitIsCritical = 10; -// CircuitOnCmd = 10; -// CircuitOffCmd = 20; -// // Serial -// CircuitNames = 0; -// // Analog -// } + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); -// public override void OffsetJoinNumbers(uint joinStart) -// { -// var joinOffset = joinStart - 1; + joinMap.OffsetJoinNumbers(joinStart); -// IsOnline = IsOnline + joinOffset; -// CircuitNames = CircuitNames + joinOffset; -// CircuitState = CircuitState + joinOffset; -// CircuitCycle = CircuitCycle + joinOffset; -// CircuitIsCritical = CircuitIsCritical + joinOffset; -// CircuitOnCmd = CircuitOnCmd + joinOffset; -// CircuitOffCmd = CircuitOffCmd + joinOffset; + Debug.Console(1, DigitalLogger, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + for (uint i = 1; i <= DigitalLogger.CircuitCount; i++) + { + var circuit = i; + DigitalLogger.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]); + DigitalLogger.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]); + DigitalLogger.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]); + trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => DigitalLogger.CycleCircuit(circuit - 1)); + trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => DigitalLogger.TurnOnCircuit(circuit - 1)); + trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => DigitalLogger.TurnOffCircuit(circuit - 1)); - - -// } -// } - -//} \ No newline at end of file + } + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DisplayControllerBridge.cs b/PepperDashEssentials/Bridges/DisplayControllerBridge.cs index 438255bf..25791796 100644 --- a/PepperDashEssentials/Bridges/DisplayControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DisplayControllerBridge.cs @@ -8,124 +8,139 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Devices.Common; +using Newtonsoft.Json; + + namespace PepperDash.Essentials.Bridges { public static class DisplayControllerApiExtensions { - - public static int InputNumber; - public static IntFeedback InputNumberFeedback; - public static List InputKeys = new List(); public static void LinkToApi(this PepperDash.Essentials.Core.DisplayBase displayDevice, BasicTriList trilist, uint joinStart, string joinMapKey) { + int inputNumber = 0; + IntFeedback inputNumberFeedback; + List inputKeys = new List(); - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DisplayControllerJoinMap; + DisplayControllerJoinMap joinMap = new DisplayControllerJoinMap(); - if (joinMap == null) + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if(!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + joinMap.OffsetJoinNumbers(joinStart); + + Debug.Console(1, "Linking to Trilist '{0}'",trilist.ID.ToString("X")); + Debug.Console(0, "Linking to Display: {0}", displayDevice.Name); + + trilist.StringInput[joinMap.Name].StringValue = displayDevice.Name; + + var commMonitor = displayDevice as ICommunicationMonitor; + if (commMonitor != null) + { + commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); + } + + inputNumberFeedback = new IntFeedback(() => { return inputNumber; }); + + // Two way feedbacks + var twoWayDisplay = displayDevice as PepperDash.Essentials.Core.TwoWayDisplayBase; + if (twoWayDisplay != null) + { + trilist.SetBool(joinMap.IsTwoWayDisplay, true); + + twoWayDisplay.CurrentInputFeedback.OutputChange += new EventHandler(CurrentInputFeedback_OutputChange); + + + inputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]); + } + + // Power Off + trilist.SetSigTrueAction(joinMap.PowerOff, () => { - joinMap = new DisplayControllerJoinMap(); - } - - joinMap.OffsetJoinNumbers(joinStart); - - Debug.Console(1, "Linking to Trilist '{0}'",trilist.ID.ToString("X")); - Debug.Console(0, "Linking to Display: {0}", displayDevice.Name); - - trilist.StringInput[joinMap.Name].StringValue = displayDevice.Name; - - var commMonitor = displayDevice as ICommunicationMonitor; - if (commMonitor != null) - { - commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); - } - - InputNumberFeedback = new IntFeedback(() => { return InputNumber; }); - - // Two way feedbacks - var twoWayDisplay = displayDevice as PepperDash.Essentials.Core.TwoWayDisplayBase; - if (twoWayDisplay != null) - { - trilist.SetBool(joinMap.IsTwoWayDisplay, true); - - twoWayDisplay.CurrentInputFeedback.OutputChange += new EventHandler(CurrentInputFeedback_OutputChange); - - - InputNumberFeedback.LinkInputSig(trilist.UShortInput[joinMap.InputSelect]); - } - - // Power Off - trilist.SetSigTrueAction(joinMap.PowerOff, () => - { - InputNumber = 102; - InputNumberFeedback.FireUpdate(); - displayDevice.PowerOff(); - }); - - displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler(PowerIsOnFeedback_OutputChange); - displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]); - - // PowerOn - trilist.SetSigTrueAction(joinMap.PowerOn, () => - { - InputNumber = 0; - InputNumberFeedback.FireUpdate(); - displayDevice.PowerOn(); - }); - - - displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]); - - int count = 1; - foreach (var input in displayDevice.InputPorts) - { - InputKeys.Add(input.Key.ToString()); - var tempKey = InputKeys.ElementAt(count - 1); - trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); }); - Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString()); - trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString(); - count++; - } - - Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect); - trilist.SetUShortSigAction(joinMap.InputSelect, (a) => - { - if (a == 0) - { - displayDevice.PowerOff(); - InputNumber = 0; - } - else if (a > 0 && a < displayDevice.InputPorts.Count && a != InputNumber) - { - displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector); - InputNumber = a; - } - else if (a == 102) - { - displayDevice.PowerToggle(); - - } - if (twoWayDisplay != null) - InputNumberFeedback.FireUpdate(); + inputNumber = 102; + inputNumberFeedback.FireUpdate(); + displayDevice.PowerOff(); }); - - var volumeDisplay = displayDevice as IBasicVolumeControls; - if (volumeDisplay != null) + displayDevice.PowerIsOnFeedback.OutputChange += new EventHandler( (o,a) => { + if (!a.BoolValue) { - trilist.SetBoolSigAction(joinMap.VolumeUp, (b) => volumeDisplay.VolumeUp(b)); - trilist.SetBoolSigAction(joinMap.VolumeDown, (b) => volumeDisplay.VolumeDown(b)); - trilist.SetSigTrueAction(joinMap.VolumeMute, () => volumeDisplay.MuteToggle()); + inputNumber = 102; + inputNumberFeedback.FireUpdate(); - var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback; - if(volumeDisplayWithFeedback != null) - { - trilist.SetUShortSigAction(joinMap.VolumeLevel, new Action((u) => volumeDisplayWithFeedback.SetVolume(u))); - volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]); - volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]); - } } + else + { + inputNumber = 0; + inputNumberFeedback.FireUpdate(); + } + }); + + displayDevice.PowerIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOff]); + + // PowerOn + trilist.SetSigTrueAction(joinMap.PowerOn, () => + { + inputNumber = 0; + inputNumberFeedback.FireUpdate(); + displayDevice.PowerOn(); + }); + + + displayDevice.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn]); + + int count = 1; + foreach (var input in displayDevice.InputPorts) + { + inputKeys.Add(input.Key.ToString()); + var tempKey = inputKeys.ElementAt(count - 1); + trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); }); + Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString()); + trilist.StringInput[(ushort)(joinMap.InputNamesOffset + count)].StringValue = input.Key.ToString(); + count++; } + Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect); + trilist.SetUShortSigAction(joinMap.InputSelect, (a) => + { + if (a == 0) + { + displayDevice.PowerOff(); + inputNumber = 0; + } + else if (a > 0 && a < displayDevice.InputPorts.Count && a != inputNumber) + { + displayDevice.ExecuteSwitch(displayDevice.InputPorts.ElementAt(a - 1).Selector); + inputNumber = a; + } + else if (a == 102) + { + displayDevice.PowerToggle(); + + } + if (twoWayDisplay != null) + inputNumberFeedback.FireUpdate(); + }); + + + var volumeDisplay = displayDevice as IBasicVolumeControls; + if (volumeDisplay != null) + { + trilist.SetBoolSigAction(joinMap.VolumeUp, (b) => volumeDisplay.VolumeUp(b)); + trilist.SetBoolSigAction(joinMap.VolumeDown, (b) => volumeDisplay.VolumeDown(b)); + trilist.SetSigTrueAction(joinMap.VolumeMute, () => volumeDisplay.MuteToggle()); + + var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback; + if(volumeDisplayWithFeedback != null) + { + trilist.SetUShortSigAction(joinMap.VolumeLevel, new Action((u) => volumeDisplayWithFeedback.SetVolume(u))); + volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[joinMap.VolumeLevel]); + volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VolumeMute]); + } + } + } + static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e) { @@ -133,22 +148,6 @@ namespace PepperDash.Essentials.Bridges } - static void PowerIsOnFeedback_OutputChange(object sender, FeedbackEventArgs e) - { - - // Debug.Console(0, "PowerIsOnFeedback_OutputChange {0}", e.BoolValue); - if (!e.BoolValue) - { - InputNumber = 102; - InputNumberFeedback.FireUpdate(); - - } - else - { - InputNumber = 0; - InputNumberFeedback.FireUpdate(); - } - } } } \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs index 35398ae6..63507cf2 100644 --- a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs @@ -12,16 +12,21 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.DM; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class DmChassisControllerApiExtentions { public static void LinkToApi(this DmChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmChassisControllerJoinMap; + DmChassisControllerJoinMap joinMap = new DmChassisControllerJoinMap(); - if (joinMap == null) - joinMap = new DmChassisControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs index c2c63d43..ca7bdeca 100644 --- a/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmRmcControllerBridge.cs @@ -9,16 +9,20 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.DM; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class DmRmcControllerApiExtensions { public static void LinkToApi(this DmRmcControllerBase rmc, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmRmcControllerJoinMap; + DmRmcControllerJoinMap joinMap = new DmRmcControllerJoinMap(); - if (joinMap == null) - joinMap = new DmRmcControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs index b8926f71..2017acb4 100644 --- a/PepperDashEssentials/Bridges/DmTxControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmTxControllerBridge.cs @@ -12,16 +12,20 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.DM; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class DmTxControllerApiExtensions { public static void LinkToApi(this DmTxControllerBase tx, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmTxControllerJoinMap; + DmTxControllerJoinMap joinMap = new DmTxControllerJoinMap(); - if (joinMap == null) - joinMap = new DmTxControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs b/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs index 8c6ac172..406550a4 100644 --- a/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmpsAudioOutputControllerBridge.cs @@ -10,16 +10,20 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.DM; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class DmpsAudioOutputControllerApiExtensions { public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmpsAudioOutputControllerJoinMap; + DmpsAudioOutputControllerJoinMap joinMap = new DmpsAudioOutputControllerJoinMap(); - if (joinMap == null) - joinMap = new DmpsAudioOutputControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs b/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs index 79313de6..cc95e07b 100644 --- a/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmpsRoutingControllerBridge.cs @@ -10,16 +10,20 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.DM; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class DmpsRoutingControllerApiExtentions { public static void LinkToApi(this DmpsRoutingController dmpsRouter, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmpsRoutingControllerJoinMap; + DmpsRoutingControllerJoinMap joinMap = new DmpsRoutingControllerJoinMap(); - if (joinMap == null) - joinMap = new DmpsRoutingControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/GenericLightingBridge.cs b/PepperDashEssentials/Bridges/GenericLightingBridge.cs index be7d88b3..543e124e 100644 --- a/PepperDashEssentials/Bridges/GenericLightingBridge.cs +++ b/PepperDashEssentials/Bridges/GenericLightingBridge.cs @@ -1,103 +1,74 @@ -//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.Devices.Common; +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.Devices.Common; -//namespace PepperDash.Essentials.Bridges -//{ -// public static class GenericLightingApiExtensions -// { -// public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey) -// { -// var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as GenericLightingJoinMap; +using Newtonsoft.Json; -// if (joinMap == null) -// joinMap = new GenericLightingJoinMap(); +namespace PepperDash.Essentials.Bridges +{ + public static class GenericLightingApiExtensions + { + public static void LinkToApi(this PepperDash.Essentials.Core.Lighting.LightingBase lightingDevice, BasicTriList trilist, uint joinStart, string joinMapKey) + { + GenericLightingJoinMap joinMap = new GenericLightingJoinMap(); -// joinMap.OffsetJoinNumbers(joinStart); -// Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); + + joinMap.OffsetJoinNumbers(joinStart); + + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + + Debug.Console(0, "Linking to Lighting Type {0}", lightingDevice.GetType().Name.ToString()); + + // GenericLighitng Actions & FeedBack + trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u])); + + int sceneIndex = 1; + foreach (var scene in lightingDevice.LightingScenes) + { + var tempIndex = sceneIndex - 1; + trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex])); + scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]); + trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name; + trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true; + sceneIndex++; + } + + if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea") + { + var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; + lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); + trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s); + } + + //ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; }); + + + /* + var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; + for (uint i = 1; i <= lightingBase.CircuitCount; i++) + { + var circuit = i; + lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]); + lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]); + lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]); + trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1)); + trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1)); + trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1)); -// Debug.Console(0, "Linking to lighting Type {0}", lightingDevice.GetType().Name.ToString()); - -// // GenericLighitng Actions & FeedBack -// trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u])); - -// int sceneIndex = 1; -// foreach (var scene in lightingDevice.LightingScenes) -// { -// var tempIndex = sceneIndex - 1; -// trilist.SetSigTrueAction((uint)(joinMap.LightingSceneOffset + sceneIndex), () => lightingDevice.SelectScene(lightingDevice.LightingScenes[tempIndex])); -// scene.IsActiveFeedback.LinkInputSig(trilist.BooleanInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)]); -// trilist.StringInput[(uint)(joinMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name; -// trilist.BooleanInput[(uint)(joinMap.ButtonVisibilityOffset + sceneIndex)].BoolValue = true; -// sceneIndex++; -// } - -// if (lightingDevice.GetType().Name.ToString() == "LutronQuantumArea") -// { -// var lutronDevice = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; -// lutronDevice.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]); -// trilist.SetStringSigAction(joinMap.IntegrationIdSet, s => lutronDevice.IntegrationId = s); -// } - -// //ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; }); - - -// /* -// var lutronLights = lightingDevice as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; - - -// for (uint i = 1; i <= lightingBase.CircuitCount; i++) -// { -// var circuit = i; -// lightingBase.CircuitNameFeedbacks[circuit - 1].LinkInputSig(trilist.StringInput[joinMap.CircuitNames + circuit]); -// lightingBase.CircuitIsCritical[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitIsCritical + circuit]); -// lightingBase.CircuitState[circuit - 1].LinkInputSig(trilist.BooleanInput[joinMap.CircuitState + circuit]); -// trilist.SetSigTrueAction(joinMap.CircuitCycle + circuit, () => lightingBase.CycleCircuit(circuit - 1)); -// trilist.SetSigTrueAction(joinMap.CircuitOnCmd + circuit, () => lightingBase.TurnOnCircuit(circuit - 1)); -// trilist.SetSigTrueAction(joinMap.CircuitOffCmd + circuit, () => lightingBase.TurnOffCircuit(circuit - 1)); - -// } -// */ -// } -// } -// public class GenericLightingJoinMap : JoinMapBase -// { -// public uint IsOnline { get; set; } -// public uint SelectScene { get; set; } -// public uint LightingSceneOffset { get; set; } -// public uint ButtonVisibilityOffset { get; set; } -// public uint IntegrationIdSet { get; set; } - -// public GenericLightingJoinMap() -// { -// // Digital -// IsOnline = 1; -// SelectScene = 1; -// IntegrationIdSet = 1; -// LightingSceneOffset = 10; -// ButtonVisibilityOffset = 40; -// // Analog -// } - -// public override void OffsetJoinNumbers(uint joinStart) -// { -// var joinOffset = joinStart - 1; - -// IsOnline = IsOnline + joinOffset; -// SelectScene = SelectScene + joinOffset; -// LightingSceneOffset = LightingSceneOffset + joinOffset; -// ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; - - - -// } -// } -//} \ No newline at end of file + } + */ + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs b/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs index aab4659d..95566712 100644 --- a/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs +++ b/PepperDashEssentials/Bridges/GenericRelayDeviceBridge.cs @@ -5,21 +5,24 @@ using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; - using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.CrestronIO; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class GenericRelayDeviceApiExtensions { public static void LinkToApi(this GenericRelayDevice relay, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as GenericRelayControllerJoinMap; + GenericRelayControllerJoinMap joinMap = new GenericRelayControllerJoinMap(); - if (joinMap == null) - joinMap = new GenericRelayControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs b/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs index 4c488c90..0ec23c55 100644 --- a/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs +++ b/PepperDashEssentials/Bridges/HdMdxxxCEControllerBridge.cs @@ -12,16 +12,20 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.DM; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class HdMdxxxCEControllerApiExtensions { public static void LinkToApi(this HdMdxxxCEController hdMdPair, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as HdMdxxxCEControllerJoinMap; + HdMdxxxCEControllerJoinMap joinMap = new HdMdxxxCEControllerJoinMap(); - if (joinMap == null) - joinMap = new HdMdxxxCEControllerJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs index aa755af5..ee246354 100644 --- a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs +++ b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs @@ -8,17 +8,20 @@ using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; using PepperDash.Essentials.Core; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class IBasicCommunicationApiExtensions { public static void LinkToApi(this GenericComm comm, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as IBasicCommunicationJoinMap; + IBasicCommunicationJoinMap joinMap = new IBasicCommunicationJoinMap(); - if (joinMap == null) - joinMap = new IBasicCommunicationJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); if (comm.CommPort == null) diff --git a/PepperDashEssentials/Bridges/IDigitalInputBridge.cs b/PepperDashEssentials/Bridges/IDigitalInputBridge.cs index 7bd89aa2..4d42cbdc 100644 --- a/PepperDashEssentials/Bridges/IDigitalInputBridge.cs +++ b/PepperDashEssentials/Bridges/IDigitalInputBridge.cs @@ -6,18 +6,23 @@ using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.CrestronIO; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class IDigitalInputApiExtenstions { public static void LinkToApi(this IDigitalInput input, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as IDigitalInputJoinMap; + IDigitalInputJoinMap joinMap = new IDigitalInputJoinMap(); - if (joinMap == null) - joinMap = new IDigitalInputJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if (!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); diff --git a/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs index 4cd65649..042a3bf3 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/AirMediaControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs index acab7925..8945d9c9 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/AppleTvJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs new file mode 100644 index 00000000..cf087e5f --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/CameraControllerJoinMap.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials.Bridges +{ + public class CameraControllerJoinMap : JoinMapBase + { + public uint IsOnline { get; set; } + public uint PowerOff { get; set; } + public uint PowerOn { get; set; } + public uint Up { get; set; } + public uint Down { get; set; } + public uint Left { get; set; } + public uint Right { get; set; } + public uint ZoomIn { get; set; } + public uint ZoomOut { get; set; } + public uint PresetRecallOffset { get; set; } + public uint PresetSaveOffset { get; set; } + public uint NumberOfPresets { get; set; } + + public CameraControllerJoinMap() + { + // Digital + IsOnline = 9; + PowerOff = 8; + PowerOn = 7; + Up = 1; + Down = 2; + Left = 3; + Right = 4; + ZoomIn = 5; + ZoomOut = 6; + PresetRecallOffset = 10; + PresetSaveOffset = 30; + NumberOfPresets = 5; + // Analog + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + PowerOff = PowerOff + joinOffset; + PowerOn = PowerOn + joinOffset; + Up = Up + joinOffset; + Down = Down + joinOffset; + Left = Left + joinOffset; + Right = Right + joinOffset; + ZoomIn = ZoomIn + joinOffset; + ZoomOut = ZoomOut + joinOffset; + PresetRecallOffset = PresetRecallOffset + joinOffset; + PresetSaveOffset = PresetSaveOffset + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs new file mode 100644 index 00000000..2b0a1c15 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/DigitalLoggerJoinMap.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials.Bridges +{ + public class DigitalLoggerJoinMap : JoinMapBase + { + public uint IsOnline { get; set; } + public uint CircuitNames { get; set; } + public uint CircuitState { get; set; } + public uint CircuitCycle { get; set; } + public uint CircuitIsCritical { get; set; } + public uint CircuitOnCmd { get; set; } + public uint CircuitOffCmd { get; set; } + + public DigitalLoggerJoinMap() + { + // Digital + IsOnline = 9; + CircuitState = 0; + CircuitCycle = 0; + CircuitIsCritical = 10; + CircuitOnCmd = 10; + CircuitOffCmd = 20; + // Serial + CircuitNames = 0; + // Analog + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + CircuitNames = CircuitNames + joinOffset; + CircuitState = CircuitState + joinOffset; + CircuitCycle = CircuitCycle + joinOffset; + CircuitIsCritical = CircuitIsCritical + joinOffset; + CircuitOnCmd = CircuitOnCmd + joinOffset; + CircuitOffCmd = CircuitOffCmd + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs index bd30a3b6..ddbec182 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DisplayControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs index 724d0c67..439cd949 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs index bcd3c740..7aa8081a 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmRmcControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs index bd83c84b..e68e5ad2 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmTxControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs index 18817a1e..faa30775 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs index bb0f3df1..ba3a8cd0 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs new file mode 100644 index 00000000..df5606d0 --- /dev/null +++ b/PepperDashEssentials/Bridges/JoinMaps/GenericLightingJoinMap.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +using PepperDash.Essentials.Core; + + +namespace PepperDash.Essentials.Bridges +{ + public class GenericLightingJoinMap : JoinMapBase + { + public uint IsOnline { get; set; } + public uint SelectScene { get; set; } + public uint LightingSceneOffset { get; set; } + public uint ButtonVisibilityOffset { get; set; } + public uint IntegrationIdSet { get; set; } + + public GenericLightingJoinMap() + { + // Digital + IsOnline = 1; + SelectScene = 1; + IntegrationIdSet = 1; + LightingSceneOffset = 10; + ButtonVisibilityOffset = 40; + // Analog + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + IsOnline = IsOnline + joinOffset; + SelectScene = SelectScene + joinOffset; + LightingSceneOffset = LightingSceneOffset + joinOffset; + ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs index ddba004a..5c91a358 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs index d5237951..e88980fe 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs index 98fc9882..953bae37 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs index fefc0286..65d4ada4 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/IDigitalInputJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs index 81860949..6358700f 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/SystemMonitorJoinMap.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Bridges { diff --git a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs index e9878be6..d374b9df 100644 --- a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs +++ b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs @@ -9,20 +9,25 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Monitoring; +using Newtonsoft.Json; + namespace PepperDash.Essentials.Bridges { public static class SystemMonitorBridge { public static void LinkToApi(this SystemMonitorController systemMonitorController, BasicTriList trilist, uint joinStart, string joinMapKey) { - var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as SystemMonitorJoinMap; + SystemMonitorJoinMap joinMap = new SystemMonitorJoinMap(); - if (joinMap == null) - joinMap = new SystemMonitorJoinMap(); + var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey); + + if(!string.IsNullOrEmpty(joinMapSerialized)) + joinMap = JsonConvert.DeserializeObject(joinMapSerialized); joinMap.OffsetJoinNumbers(joinStart); - //Debug.Console(1, systemMonitorController, "Linking API starting at join: {0}", joinStart); + Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); + Debug.Console(2, systemMonitorController, "Linking API starting at join: {0}", joinStart); systemMonitorController.TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]); //trilist.SetUShortSigAction(joinMap.TimeZone, new Action(u => systemMonitorController.SetTimeZone(u))); @@ -33,18 +38,13 @@ namespace PepperDash.Essentials.Bridges systemMonitorController.BACnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]); systemMonitorController.ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]); - // iterate the program status feedback collection and map all the joins var programSlotJoinStart = joinMap.ProgramStartJoin; foreach (var p in systemMonitorController.ProgramStatusFeedbackCollection) { - - // TODO: link feedbacks for each program slot var programNumber = p.Value.Program.Number; - //Debug.Console(1, systemMonitorController, "Linking API for Program Slot: {0} starting at join: {1}", programNumber, programSlotJoinStart); - trilist.SetBoolSigAction(programSlotJoinStart + joinMap.ProgramStart, new Action (b => SystemMonitor.ProgramCollection[programNumber].OperatingState = eProgramOperatingState.Start)); p.Value.ProgramStartedFeedback.LinkInputSig(trilist.BooleanInput[programSlotJoinStart + joinMap.ProgramStart]); diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index b4a01e80..e642fd96 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -134,15 +134,17 @@ - + + + diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs index 5e71b689..3673a384 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/BasicConfig.cs @@ -26,6 +26,9 @@ namespace PepperDash.Essentials.Core.Config [JsonProperty("tieLines")] public List TieLines { get; set; } + [JsonProperty("joinMaps")] + public Dictionary JoinMaps { get; set; } + /// /// Checks SourceLists for a given list and returns it if found. Otherwise, returns null /// diff --git a/PepperDashEssentials/Bridges/JoinMapBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs similarity index 57% rename from PepperDashEssentials/Bridges/JoinMapBase.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs index 13d08a3f..23669066 100644 --- a/PepperDashEssentials/Bridges/JoinMapBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs @@ -4,23 +4,30 @@ using System.Linq; using System.Text; using Crestron.SimplSharp; -namespace PepperDash.Essentials.Bridges +using PepperDash.Essentials.Core.Config; + +namespace PepperDash.Essentials.Core { public static class JoinMapHelper { /// - /// Attempts to get the join map from config + /// Attempts to get the serialized join map from config /// /// /// - public static JoinMapBase GetJoinMapForDevice(string joinMapKey) + public static string GetJoinMapForDevice(string joinMapKey) { - if (!string.IsNullOrEmpty(joinMapKey)) + if (string.IsNullOrEmpty(joinMapKey)) return null; - // FUTURE TODO: Get the join map from the ConfigReader.ConfigObject + var joinMap = ConfigReader.ConfigObject.JoinMaps[joinMapKey]; - return null; + if (joinMap != null) + { + return joinMap; + } + else + return null; } } diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 39cb2235..3eee1c13 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -134,6 +134,7 @@ + diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/CameraControl.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraControl.cs similarity index 100% rename from essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/CameraControl.cs rename to essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraControl.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj index cf723ecf..0b0ffaf9 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj @@ -120,7 +120,7 @@ - + From 061d95e2b1bea0f0fdd5aacaf49c65be3961b099 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Mon, 9 Sep 2019 16:13:25 -0600 Subject: [PATCH 2/4] Moves IBridge condition to the top of the list to allow plugin bridges to override existing ones. --- PepperDashEssentials/Bridges/BridgeBase.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index 462ba981..f1a24f86 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -78,7 +78,12 @@ namespace PepperDash.Essentials.Bridges if (device != null) { - if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController) + if (device is IBridge) // Check for this first to allow bridges in plugins to override existing bridges that apply to the same type. + { + (device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; + } + else if (device is PepperDash.Essentials.Core.Monitoring.SystemMonitorController) { (device as PepperDash.Essentials.Core.Monitoring.SystemMonitorController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; @@ -138,11 +143,6 @@ namespace PepperDash.Essentials.Bridges (device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; } - else if (device is IBridge) - { - (device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); - continue; - } else if (device is HdMdxxxCEController) { (device as HdMdxxxCEController).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); From 7e9256187abfa89ce6df30610df015c1e477951c Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 11 Sep 2019 13:16:23 -0600 Subject: [PATCH 3/4] corrects issues with VideoSyncStatus feedback --- PepperDashEssentials/Bridges/DmChassisControllerBridge.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs index 14fa580c..422b0bf5 100644 --- a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs @@ -74,10 +74,12 @@ namespace PepperDash.Essentials.Bridges if (txDevice != null) { - txDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.InputEndpointOnline + ioSlot]); + txDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); } else { + dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); + var inputPort = dmChassis.InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)]; if(inputPort != null) { @@ -141,7 +143,6 @@ namespace PepperDash.Essentials.Bridges dmChassis.UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb + ioSlot]); dmChassis.UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb + ioSlot]); - dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); dmChassis.OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames + ioSlot]); dmChassis.InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames + ioSlot]); From 4b926c10f6830a0ddc41394d3785f29b2e2e94a7 Mon Sep 17 00:00:00 2001 From: Jason T Alborough Date: Wed, 11 Sep 2019 15:44:19 -0400 Subject: [PATCH 4/4] ECS-1158 Fixes issue where iBasicCommunicationBridge will toss an exception when it receives data. --- .../Bridges/IBasicCommunicationBridge.cs | 2 +- .../PepperDash_Essentials_Core.csproj | 530 +++++++++--------- .../Essentials_DM/Essentials_DM.csproj | 328 +++++------ .../Essentials Devices Common.csproj | 408 +++++++------- 4 files changed, 634 insertions(+), 634 deletions(-) diff --git a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs index ee246354..86fbf78b 100644 --- a/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs +++ b/PepperDashEssentials/Bridges/IBasicCommunicationBridge.cs @@ -39,7 +39,7 @@ namespace PepperDash.Essentials.Bridges trilist.SetString(joinMap.TextReceived, a.Text); }; trilist.SetStringSigAction(joinMap.SendText, new Action(s => comm.CommPort.SendText(s))); - trilist.SetStringSigAction(joinMap.SetPortConfig + 1, new Action(s => comm.SetPortConfig(s))); + trilist.SetStringSigAction(joinMap.SetPortConfig, new Action(s => comm.SetPortConfig(s))); var sComm = comm.CommPort as ISocketStatus; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 3eee1c13..f564d970 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -1,266 +1,266 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - Library - Properties - PepperDash.Essentials.Core - PepperDash_Essentials_Core - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\..\references\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rem S# Pro preparation will execute after these operations - + + + Release + AnyCPU + 9.0.30729 + 2.0 + {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} + Library + Properties + PepperDash.Essentials.Core + PepperDash_Essentials_Core + {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WindowsCE + E2BECB1F-8C8C-41ba-B736-9BE7D946A398 + 5.0 + SmartDeviceProject1 + v3.5 + Windows CE + + + + + .allowedReferenceRelatedFileExtensions + true + full + false + bin\ + DEBUG;TRACE; + prompt + 4 + 512 + true + true + off + + + .allowedReferenceRelatedFileExtensions + none + true + bin\ + prompt + 4 + 512 + true + true + off + + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.EthernetCommunications.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Remotes.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll + + + + False + ..\..\references\PepperDash_Core.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpTimerEventInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rem S# Pro preparation will execute after these operations + \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj index 68aa1e17..721647ca 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj +++ b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj @@ -1,165 +1,165 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {9199CE8A-0C9F-4952-8672-3EED798B284F} - Library - Properties - PepperDash.Essentials.DM - PepperDash_Essentials_DM - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll - - - - False - ..\..\references\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - - - - - - - rem S# Pro preparation will execute after these operations - + + + Release + AnyCPU + 9.0.30729 + 2.0 + {9199CE8A-0C9F-4952-8672-3EED798B284F} + Library + Properties + PepperDash.Essentials.DM + PepperDash_Essentials_DM + {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WindowsCE + E2BECB1F-8C8C-41ba-B736-9BE7D946A398 + 5.0 + SmartDeviceProject1 + v3.5 + Windows CE + + + + + .allowedReferenceRelatedFileExtensions + true + full + false + bin\ + DEBUG;TRACE; + prompt + 4 + 512 + true + true + off + + + .allowedReferenceRelatedFileExtensions + none + true + bin\ + prompt + 4 + 512 + true + true + off + + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll + + + + False + ..\..\references\PepperDash_Core.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} + PepperDash_Essentials_Core + + + + + + + + + rem S# Pro preparation will execute after these operations + \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj index 0b0ffaf9..e751a35e 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj @@ -1,205 +1,205 @@ - - - Release - AnyCPU - 9.0.30729 - 2.0 - {892B761C-E479-44CE-BD74-243E9214AF13} - Library - Properties - PepperDash.Essentials.Devices.Common - Essentials Devices Common - {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.0 - SmartDeviceProject1 - v3.5 - Windows CE - - - - - .allowedReferenceRelatedFileExtensions - true - full - false - bin\ - DEBUG;TRACE; - prompt - 4 - 512 - true - true - off - - - .allowedReferenceRelatedFileExtensions - none - true - bin\ - prompt - 4 - 512 - true - true - off - - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Gateways.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Lighting.dll - - - - False - ..\..\references\PepperDash_Core.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe - False - - - False - ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} - PepperDash_Essentials_Core - - - - - - - - - rem S# Pro preparation will execute after these operations - + + + Release + AnyCPU + 9.0.30729 + 2.0 + {892B761C-E479-44CE-BD74-243E9214AF13} + Library + Properties + PepperDash.Essentials.Devices.Common + Essentials Devices Common + {0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WindowsCE + E2BECB1F-8C8C-41ba-B736-9BE7D946A398 + 5.0 + SmartDeviceProject1 + v3.5 + Windows CE + + + + + .allowedReferenceRelatedFileExtensions + true + full + false + bin\ + DEBUG;TRACE; + prompt + 4 + 512 + true + true + off + + + .allowedReferenceRelatedFileExtensions + none + true + bin\ + prompt + 4 + 512 + true + true + off + + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DeviceSupport.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Gateways.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Lighting.dll + + + + False + ..\..\references\PepperDash_Core.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe + False + + + False + ..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5} + PepperDash_Essentials_Core + + + + + + + + + rem S# Pro preparation will execute after these operations + \ No newline at end of file