Added feedback/action linking to SystemMonitorBridge

This commit is contained in:
Neil Dorin
2018-12-10 16:33:24 -07:00
parent 9bc0269e78
commit 531e7186f2
3 changed files with 17 additions and 5 deletions

View File

@@ -23,7 +23,12 @@ namespace PepperDash.Essentials.Bridges
joinMap.OffsetJoinNumbers(joinStart); joinMap.OffsetJoinNumbers(joinStart);
systemMonitorController.TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]);
trilist.SetUShortSigAction(joinMap.TimeZone, new Action<ushort>(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) foreach (var p in SystemMonitor.ProgramCollection)
@@ -47,7 +52,7 @@ namespace PepperDash.Essentials.Bridges
//Serial //Serial
public uint TimeZoneName { get; set; } public uint TimeZoneName { get; set; }
public uint IOControllerVersion { get; set; } public uint IOControllerVersion { get; set; }
public uint SNMPAppVersion { get; set; } public uint SnmpAppVersion { get; set; }
public uint BACnetAppVersion { get; set; } public uint BACnetAppVersion { get; set; }
public uint ControllerVersion { get; set; } public uint ControllerVersion { get; set; }
@@ -63,7 +68,7 @@ namespace PepperDash.Essentials.Bridges
TimeZoneName = 1; TimeZoneName = 1;
IOControllerVersion = 2; IOControllerVersion = 2;
SNMPAppVersion = 3; SnmpAppVersion = 3;
BACnetAppVersion = 4; BACnetAppVersion = 4;
ControllerVersion = 5; ControllerVersion = 5;
@@ -86,7 +91,7 @@ namespace PepperDash.Essentials.Bridges
TimeZoneName = TimeZoneName + joinOffset; TimeZoneName = TimeZoneName + joinOffset;
IOControllerVersion = IOControllerVersion + joinOffset; IOControllerVersion = IOControllerVersion + joinOffset;
SNMPAppVersion = SNMPAppVersion + joinOffset; SnmpAppVersion = SnmpAppVersion + joinOffset;
BACnetAppVersion = BACnetAppVersion + joinOffset; BACnetAppVersion = BACnetAppVersion + joinOffset;
ControllerVersion = ControllerVersion + joinOffset; ControllerVersion = ControllerVersion + joinOffset;

View File

@@ -146,13 +146,17 @@ namespace PepperDash.Essentials
"------------------------------------------------"); "------------------------------------------------");
} }
SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true;
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", e); Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", e);
} }
// Notify the
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
} }
/// <summary> /// <summary>
@@ -220,6 +224,9 @@ namespace PepperDash.Essentials
// Build the processor wrapper class // Build the processor wrapper class
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor")); 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) foreach (var devConf in ConfigReader.ConfigObject.Devices)
{ {