diff --git a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs index f891fe9c..681113e2 100644 --- a/PepperDashEssentials/Bridges/SystemMonitorBridge.cs +++ b/PepperDashEssentials/Bridges/SystemMonitorBridge.cs @@ -3,10 +3,102 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; +using Crestron.SimplSharpPro.Diagnostics; + +using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Monitoring; namespace PepperDash.Essentials.Bridges { - public class SystemMonitorBridge + public static class SystemMonitorBridge { + public static void LinkToApi(this SystemMonitorController systemMonitorController, BasicTriList trilist, uint joinStart, string joinMapKey) + { + var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as SystemMonitorJoinMap; + + if (joinMap == null) + joinMap = new SystemMonitorJoinMap(); + + joinMap.OffsetJoinNumbers(joinStart); + + + + + foreach (var p in SystemMonitor.ProgramCollection) + { + + } + } + } + + public class SystemMonitorJoinMap : JoinMapBase + { + //Digital + public uint ProgramStart { get; set; } + public uint ProgramStop { get; set; } + public uint ProgramRegister { get; set; } + public uint ProgramUnregister { get; set; } + + //Analog + public uint TimeZone { get; set; } + + //Serial + public uint TimeZoneName { get; set; } + public uint IOControllerVersion { get; set; } + public uint SNMPAppVersion { get; set; } + public uint BACnetAppVersion { get; set; } + public uint ControllerVersion { get; set; } + + public uint ProgramName { get; set; } + public uint ProgramCompiledTime { get; set; } + public uint ProgramCrestronDatabaseVersion { get; set; } + public uint ProgramEnvironmentVersion { get; set; } + + + public SystemMonitorJoinMap() + { + TimeZone = 1; + + TimeZoneName = 1; + IOControllerVersion = 2; + SNMPAppVersion = 3; + BACnetAppVersion = 4; + ControllerVersion = 5; + + ProgramStart = 11; + ProgramStop = 12; + ProgramRegister = 13; + ProgramUnregister = 14; + + ProgramName = 11; + ProgramCompiledTime = 12; + ProgramCrestronDatabaseVersion = 13; + ProgramEnvironmentVersion = 14; + } + + public override void OffsetJoinNumbers(uint joinStart) + { + var joinOffset = joinStart - 1; + + TimeZone = TimeZone; + + TimeZoneName = TimeZoneName + joinOffset; + IOControllerVersion = IOControllerVersion + joinOffset; + SNMPAppVersion = SNMPAppVersion + joinOffset; + BACnetAppVersion = BACnetAppVersion + joinOffset; + ControllerVersion = ControllerVersion + joinOffset; + + ProgramStart = ProgramStart + joinOffset; + ProgramStop = ProgramStop + joinOffset; + ProgramRegister = ProgramRegister + joinOffset; + ProgramUnregister = ProgramUnregister; + + ProgramName = ProgramName + joinOffset; + ProgramCompiledTime = ProgramCompiledTime + joinOffset; + ProgramCrestronDatabaseVersion = ProgramCrestronDatabaseVersion + joinOffset; + ProgramEnvironmentVersion = ProgramEnvironmentVersion + joinOffset; + } } } \ No newline at end of file diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index 8270090c..e38f2f70 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -119,6 +119,7 @@ + diff --git a/essentials-framework b/essentials-framework index 792f4e72..e180e522 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit 792f4e72d101ace6abe9d242399efc58fa43572b +Subproject commit e180e5224990ce2ba0ab02b0d497852fa6178910