From 531e7186f2b1c887b75db36bec015d2379d5da9c Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Mon, 10 Dec 2018 16:33:24 -0700 Subject: [PATCH] Added feedback/action linking to SystemMonitorBridge --- PepperDashEssentials/Bridges/SystemMonitorBridge.cs | 11 ++++++++--- PepperDashEssentials/ControlSystem.cs | 9 ++++++++- essentials-framework | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs index 681113e2..27199e03 100644 --- a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs +++ b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs @@ -23,7 +23,12 @@ namespace PepperDash.Essentials.Bridges joinMap.OffsetJoinNumbers(joinStart); + systemMonitorController.TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]); + trilist.SetUShortSigAction(joinMap.TimeZone, new Action(u => systemMonitorController.SetTimeZone(u))); + systemMonitorController.TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName]); + systemMonitorController.IOControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]); + systemMonitorController.SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion]); foreach (var p in SystemMonitor.ProgramCollection) @@ -47,7 +52,7 @@ namespace PepperDash.Essentials.Bridges //Serial public uint TimeZoneName { get; set; } public uint IOControllerVersion { get; set; } - public uint SNMPAppVersion { get; set; } + public uint SnmpAppVersion { get; set; } public uint BACnetAppVersion { get; set; } public uint ControllerVersion { get; set; } @@ -63,7 +68,7 @@ namespace PepperDash.Essentials.Bridges TimeZoneName = 1; IOControllerVersion = 2; - SNMPAppVersion = 3; + SnmpAppVersion = 3; BACnetAppVersion = 4; ControllerVersion = 5; @@ -86,7 +91,7 @@ namespace PepperDash.Essentials.Bridges TimeZoneName = TimeZoneName + joinOffset; IOControllerVersion = IOControllerVersion + joinOffset; - SNMPAppVersion = SNMPAppVersion + joinOffset; + SnmpAppVersion = SnmpAppVersion + joinOffset; BACnetAppVersion = BACnetAppVersion + joinOffset; ControllerVersion = ControllerVersion + joinOffset; diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index aec533cd..8c28a48c 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -146,13 +146,17 @@ namespace PepperDash.Essentials "------------------------------------------------"); } - SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true; } catch (Exception e) { Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", e); + + } + // Notify the + SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; + } /// @@ -220,6 +224,9 @@ namespace PepperDash.Essentials // Build the processor wrapper class DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor")); + // Add global System Monitor device + DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor")); + foreach (var devConf in ConfigReader.ConfigObject.Devices) { diff --git a/essentials-framework b/essentials-framework index e180e522..389352d4 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit e180e5224990ce2ba0ab02b0d497852fa6178910 +Subproject commit 389352d4dadcf9e54eb6ad141901b1bced0788ea